-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support generic method syntax in dart2js #25835
Comments
https://codereview.chromium.org/1723443003/ provides support for this, when the flag '--enable-generic-methods' is specified. Missing: The specified type parameters are ignored and hence all usages of the type parameters will cause an 'unknown type' warning or possibly a different warning because the same name is declared also in an enclosing scope and the usage is incorrect for that declaration. |
https://codereview.chromium.org/1942763002/ adds support (still behind a flag as mentioned, but it has been renamed to '--generic-method-syntax') for passing method/function type variables into the resolution phase, and making them appear to be the type |
As of 9bf3b95 (Nov 22, 2016), the generic method syntax feature is enabled by default. The option |
The
dart2js
compiler should support declaration of type parameters in function and method declarations, and it should support provision of type arguments in message sends. The type parameter declaration grammar should be identical to the grammar of type parameter declarations on classes, and the type argument grammar should be identical to the grammar of type arguments passed to constructors onnew
expressions.The text was updated successfully, but these errors were encountered: