Thanks to @eernstg for pointing on this. There's no error if a primary constructor of a JS interop type is torn off.
For example there is no expected errors in the test below.
import 'dart:js_interop';
extension type ET._(JSObject _) implements JSObject {
}
@JS("ET")
extension type ET2(JSObject _) implements JSObject {
}
extension type ET3.p(JSObject _) implements JSObject {
}
main() {
var c1 = ET._;
// ^^^^^
// [analyzer] unspecified
// [web] unspecified
var c2 = ET2.new;
// ^^^^^^^
// [analyzer] unspecified
// [web] unspecified
var c3 = ET3.p;
// ^^^^^
// [analyzer] unspecified
// [web] unspecified
}
cc @srujzs
Dart SDK version: 3.10.0-edge.9f2218e4509210576abecc79d7184c94a3ad0e26 (main) (Fri Aug 8 20:46:19 2025 -0700) on "linux_x64"