0937087af8
This allows the parser to parse constant patterns at lower precedence level in order to recognize more expressions in this context. To support this, _parsePrecedenceExpressionLoop special cases a few cases that should _not_ be parsed as expression in a constant pattern context. Closes #50996 Change-Id: I43bb0ce52d366bd2dfcf47e12eec5883402f668a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282100 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Jens Johansen <jensj@google.com>
15 lines
413 B
Plaintext
15 lines
413 B
Plaintext
library /*isNonNullableByDefault*/;
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
import "org-dartlang-testcase:///const_patterns_binary.dart" as prefix;
|
|
|
|
class Class extends core::Object {
|
|
static const field core::int value = 2;
|
|
synthetic constructor •() → self::Class
|
|
;
|
|
}
|
|
static const field core::int value = 1;
|
|
static method method<T extends core::Object? = dynamic>(dynamic o) → dynamic
|
|
;
|