Files
sdk/pkg/front_end/testcases/patterns/final_variable_inside_case.dart.weak.expect
T
Johnni Winther c1bb19d002 [cfe] Fix lowering encodings
Cleans up some missing promoted variable gets and temporary
variables that were incorrectly marked as final.

Change-Id: I26412efe2dbb45b807ad6aba7f67c27981b1619c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279011
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-01-16 10:13:44 +00:00

34 lines
527 B
Plaintext

library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
static method test(dynamic x) → dynamic {
#L1:
{
dynamic #t1;
final dynamic #t2 = x;
core::int #t3 = -1;
core::bool #t4 = false;
if(!#t4) {
final dynamic y = #t2;
#t3 = 0;
#t4 = true;
#t1 = y;
}
switch(#t3) {
#L2:
case #C1:
{
final dynamic y = #t1{dynamic};
{
break #L1;
}
}
}
}
}
constants {
#C1 = 0
}