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

Grammar fix: Add support for covariant late final instance variables #1728

Merged
merged 3 commits into from
Jul 9, 2021

Conversation

eernstg
Copy link
Member

@eernstg eernstg commented Jul 8, 2021

The current grammar does not allow an instance variable declaration with modifiers covariant late final. However, that should be allowed, because a late final variable does have a setter. This PR adds a grammar rule to enable that.

There is no implementation effort, because this construct is already used in language/nnbd/late/covariant_instance_field_test.dart, and that test succeeds on all configurations, cf. https://dart-ci.firebaseapp.com/current_results/#/filter=language/nnbd/late/covariant_instance_field_test&showAll.

@eernstg eernstg requested a review from lrhn July 8, 2021 13:55
@google-cla google-cla bot added the cla: yes label Jul 8, 2021
@eernstg eernstg merged commit a3f5084 into master Jul 9, 2021
@eernstg eernstg deleted the fix_covariant_final_jul21 branch July 9, 2021 09:24
dart-bot pushed a commit to dart-lang/sdk that referenced this pull request Jul 12, 2021
Change Dart.g to be in sync with the language specification after
dart-lang/language#1728.

Change-Id: I7587da87ec6a0300810949a34e90af5560cbeac0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206261
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants