Files
Erik Ernst 05ae94dc91 Support static abstract variables and require initializers
This CL adds a grammar rule to Dart.g and Dart.g4 such that a
variable declaration can be `static abstract`. It also changes the rule
for `static final` and `static const` variable declarations such that
it is a syntax error if they do not have an initializing expression.

This restores the approach which was used before augmentations were
added. It is possible to do this because the added flexibility
would only allow cases which are intended to be an error, because it
is no longer possible to "override" or "extend" an implementation
in an augmenting declaration.

Change-Id: Id7696880a948697678eaf368c69c390b9c8f4e7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/485440
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2026-03-04 04:24:07 -08:00
..