Skip to content

Analyzer allows function type parameters in new Function syntax #33398

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

Closed
leafpetersen opened this issue Jun 8, 2018 · 1 comment
Closed
Assignees
Labels
legacy-area-analyzer Use area-devexp instead. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Milestone

Comments

@leafpetersen
Copy link
Member

The grammar for the new for Dart 2 Function type syntax does not allow old-style function typed parameters to be mixed in with the new Function syntax. The following should be rejected:

typedef F = int Function(int f());

The analyzer currently allows this.

See https://github.com/dart-lang/sdk/blob/master/docs/language/informal/generic-function-type-alias.md for the relevant grammar.

cc @eernstg

@leafpetersen leafpetersen added the legacy-area-analyzer Use area-devexp instead. label Jun 8, 2018
@bwilkerson bwilkerson added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Aug 29, 2018
@bwilkerson bwilkerson added this to the Dart2.1 milestone Aug 29, 2018
@scheglov scheglov added needs-info We need additional information from the issue author (auto-closed after 14 days if no response) and removed needs-info We need additional information from the issue author (auto-closed after 14 days if no response) labels Sep 9, 2018
@scheglov scheglov self-assigned this Sep 9, 2018
@scheglov
Copy link
Contributor

scheglov commented Sep 9, 2018

dart-bot pushed a commit that referenced this issue Sep 10, 2018
…_FUNCTION_TYPE.

[email protected], [email protected]

Change-Id: I2b1c7938c081b771e554149846c8157f8332e061
Bug: #33398
Reviewed-on: https://dart-review.googlesource.com/74043
Commit-Queue: Konstantin Shcheglov <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>
Reviewed-by: Dan Rubel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-area-analyzer Use area-devexp instead. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants