You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
Initial implementation of #301 may not cover this.
identify these nodes in the AST by examining the staticType
emit the instantiation
ensure RTTI is associated
The nodes this can happen to are: PropertyAccess, PrefixedIdentifier and SimpleIdentifier.
You can't write the instantiation explicitly yet (o.m<String>) but it can be inferred by the type system. These do come up in practice, so we shouldn't defer this one too long. For example, passing a generic function to something that expects a non-generic function type.
The text was updated successfully, but these errors were encountered:
import'dart:math'show min; // <-- generic: <T extends num>(T, T) -> TtypedefintInt2Int2Int(int x, int y);
main() {
Int2Int2Int f = min; // Strong mode infers: `min<int>`int y =f(123, 456); // should work in DDC
(f asdynamic)/*<int>*/(123, 456); // runtime error: can't pass type args, `f` doesn't take type args
(min asdynamic)/*<int>*/(123, 456); // this should work: dynamic call with type args
(min asdynamic)(123, 456); // this tooprint(y);
}
Initial implementation of #301 may not cover this.
The nodes this can happen to are: PropertyAccess, PrefixedIdentifier and SimpleIdentifier.
You can't write the instantiation explicitly yet (
o.m<String>
) but it can be inferred by the type system. These do come up in practice, so we shouldn't defer this one too long. For example, passing a generic function to something that expects a non-generic function type.The text was updated successfully, but these errors were encountered: