This flag is set when a variable declaration is moved earlier in
order to be available for subsequent code that couldn't contain
its declaration. For instance variables declared in patterns which
needs to be declared before the matching expressions that initialize
them.
TEST=existing expectations tests
Change-Id: I80ab1138f08f725f3e01905c1a57a1483f809328
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291820
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
This splits cached expression by receiver type such that the initializing
expression for a cached variable isn't stored in the late variable
initializer, if it can be obtained in different ways. For instance having
both a list pattern and a map pattern in the same switch will trigger
caching of the .length property but obtaining expression differ base on
the receiver type, in the first case List.length and in second case
Map.length.
Closes#51138Closes#51140
Change-Id: Ic4d8ca394a872113114514f72274413b836fdfb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280081
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>