-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Closed
Copy link
Labels
P4area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.dev-compiler-fixed-with-kernelweb-dev-compiler
Description
class Foo<T> {
Foo();
}
typedef Foo FooOperation<T>([T value]);
class FooOperator<T> {
FooOperation<T> op;
FooOperator(this.op);
}
Foo<String> start() {
FooOperator operation = FooOperator<String>(
([_]) => Foo<String>()
);
return operation.op();
}
main() {
start();
}
The above snippet passes in DDC but fails in CFE with:
Unhandled exception:
type '([String]) => Foo<String>' is not a subtype of type '([dynamic]) => Foo<dynamic>'
It seems that DDC is missing the function type check (i.e., dynamicToFooOfString._check()).
What's the expected behavior here? This pattern's being used quite a bit internally, so making this stricter will require some cleanup.
Stargator
Metadata
Metadata
Assignees
Labels
P4area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.dev-compiler-fixed-with-kernelweb-dev-compiler