Skip to content

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 <[email protected]>
Reviewed-by: Lasse R.H. Nielsen <[email protected]>
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.

3 participants