-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ontype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)web-dev-compiler
Description
from @vsmenon comment here: #27952 (comment)
The original example now gives a static error. If I change
foo(h, 42)
tofoo(h as dynamic, 42)
, I do get a runtime error:
Type 'JSObject<makeGenericFnType>' is not a subtype of type '(Object) -> dynamic'
the repro is:
h/*<T>*/(a) {
return a as dynamic/*=T*/;
}
Object foo(f(Object a), Object a) {
return f(a);
}
void main() {
var x = foo(h as dynamic, 42);
print(x);
}
the type of h
is showing up as JSObject<makeGenericFnType>
but it should be <T>(dynamic) -> dynamic
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ontype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)web-dev-compiler