blob: fed647c5281053eebb7c570ee1c81d4c1f72197c [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/patterns/simple_switch_with_guards_error.dart:10:14: Error: Variable pattern 'a' doesn't have the same type or finality in all cases.
// return a;
// ^
//
import self as self;
import "dart:core" as core;
static method test(dynamic x) dynamic {
#L1:
{
final synthesized dynamic #0#0 = x;
synthesized core::bool #0#4;
synthesized core::bool #0#4#isSet = false;
synthesized dynamic #0#6;
synthesized core::bool #0#6#isSet = false;
synthesized dynamic #0#7;
synthesized core::bool #0#7#isSet = false;
dynamic #t1;
{
lowered hoisted core::int a#case#0;
lowered hoisted core::double a#case#1;
if(#0#0 is core::List<dynamic> && (#0#4#isSet ?{core::bool} #0#4{core::bool} : let final core::bool #t2 = #0#4#isSet = true in #0#4 = #0#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1) && ((#0#6#isSet ?{dynamic} #0#6{dynamic} : let final core::bool #t3 = #0#6#isSet = true in #0#6 = #0#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic}) is core::int && (let final core::int #t4 = a#case#0 = (#0#6#isSet ?{dynamic} #0#6{dynamic} : let final core::bool #t5 = #0#6#isSet = true in #0#6 = #0#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic}) as{Unchecked} core::int in true)) && a#case#0.{core::int::isEven}{core::bool} && (let final core::int #t6 = #t1 = a#case#0 in true) || #0#0 is core::List<dynamic> && (#0#4#isSet ?{core::bool} #0#4{core::bool} : let final core::bool #t7 = #0#4#isSet = true in #0#4 = #0#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1) && ((#0#7#isSet ?{dynamic} #0#7{dynamic} : let final core::bool #t8 = #0#7#isSet = true in #0#7 = #0#0{core::List<dynamic>}.{core::List::[]}(1){(core::int) → dynamic}) is core::double && (let final core::double #t9 = a#case#1 = (#0#7#isSet ?{dynamic} #0#7{dynamic} : let final core::bool #t10 = #0#7#isSet = true in #0#7 = #0#0{core::List<dynamic>}.{core::List::[]}(1){(core::int) → dynamic}) as{Unchecked} core::double in true)) && a#case#1.{core::double::ceil}(){() → core::int}.{core::int::isOdd}{core::bool} && (let final core::double #t11 = #t1 = a#case#1 in true)) {
core::int a = invalid-expression "pkg/front_end/testcases/patterns/simple_switch_with_guards_error.dart:10:14: Error: Variable pattern 'a' doesn't have the same type or finality in all cases.
return a;
^";
{
return a;
}
}
}
{
{
{
return null;
}
}
}
}
}
constants {
#C1 = 2
}