Skip to content
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

Dart2js fails on tests/language_2/generic_methods_generic_function_result_test.dart #30208

Closed
crelier opened this issue Jul 19, 2017 · 9 comments
Assignees
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. front-end-fasta

Comments

@crelier
Copy link
Contributor

crelier commented Jul 19, 2017

Dart2js fails compiling tests/language_2/generic_methods_generic_function_result_test.dart

tests/language_2/generic_methods_generic_function_result_test.dart:21:33:
Error: Expected ')' before this.
  Expect.equals(123, list[1]<int>(100, 23));
                                ^
Error: Compilation failed.
@sigmundch
Copy link
Member

Reassigning to front-end area, since this seems like the error here is in the parser for generic method syntax.

@peter-ahe-google
Copy link
Contributor

We need to get a specification for this. Last time I heard about this, it was considered as a future extension, not actually on the table.

@crelier
Copy link
Contributor Author

crelier commented Jul 21, 2017

Yes, sorry, the test is using a generic function type as type argument in List in the return type, which is not allowed. See related issue #30207.

I will fix the test and revisit both issues as needed.

@crelier
Copy link
Contributor Author

crelier commented Jul 21, 2017

The test has been updated, but it still fails.

@peter-ahe-google
Copy link
Contributor

Thank you, Regis!

@sigmundch sigmundch added the area-front-end Use area-front-end for front end / CFE / kernel format related issues. label Oct 4, 2017
@bwilkerson
Copy link
Member

This issue might be impacted by https://dart-review.googlesource.com/c/sdk/+/12040.

@eernstg
Copy link
Member

eernstg commented Oct 12, 2017

Peter, I know and understand that you strongly prefer an update to dartLangSpec.tex, but we haven't yet added this feature there.

However, we've had an informal specification which includes the relevant grammar productions at least since Oct 20, 2016 (see here):

argumentPart:
    typeArguments? arguments
selector:
    assignableSelector | argumentPart

which is by the way identical to the rules we have in the current version and in Dart.g today.

The issue #27501 where this syntax was introduced was closed on Nov 30, 2016.

Granted, we do need to make dartLangSpec.tex catch up with all the language changes, but is there anything else that we could do that would make you accept that a language feature has been introduced (as opposed to 'being considered as a future extension'), beyond the actions and documents that I already mentioned?

@sjindel-google
Copy link
Contributor

I have added language_2/generic_no_such_method_dispatcher_simple_test to temporarily substitute for testing generic no such method errors in Kernel. We should remove that test when this is fixed.

@fishythefish
Copy link
Member

Closing since this no longer seems to be an issue. Also deleting language_2/generic_no_such_method_dispatcher_simple_test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. front-end-fasta
Projects
None yet
Development

No branches or pull requests

7 participants