You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first const [42] was evaluated to a constant #C2, but the 2nd const [42] (in the pattern if (value case const [42])) was not evaluated. This results in runtime failures in certain tests (such as co19/LanguageFeatures/Patterns/constant_A03_t02, co19/LanguageFeatures/Patterns/constant_A03_t04 etc).
@stereotype441 This happens because the handleLiteralList call for the const [42] in value case const [42] doesn't have a constKeyword. The const keyword is instead provided to the handleConstantPattern method.
I've created https://dart-review.googlesource.com/c/sdk/+/273960 which instead includes the const keyword as part of the subexpression, thereby normalizing the handling of expression that can be prefixed by const.
Part of #49749.
Kernel:
The first
const [42]
was evaluated to a constant#C2
, but the 2ndconst [42]
(in the patternif (value case const [42])
) was not evaluated. This results in runtime failures in certain tests (such asco19/LanguageFeatures/Patterns/constant_A03_t02
,co19/LanguageFeatures/Patterns/constant_A03_t04
etc)./cc @johnniwinther
The text was updated successfully, but these errors were encountered: