Closed
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