Files
sdk/pkg/front_end/testcases/patterns/var_variable_inside_case.dart.weak.expect
T
Johnni Winther 2528bf8666 [kernel] Add VariableDeclaration.isHoisted
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>
2023-03-30 07:13:40 +00:00

18 lines
298 B
Plaintext

library /*isNonNullableByDefault*/;
import self as self;
static method test(dynamic x) → dynamic {
#L1:
{
final synthesized dynamic #0#0 = x;
{
hoisted dynamic y;
if(let final dynamic #t1 = y = #0#0 in true) {
{
break #L1;
}
}
}
}
}