blob: 450c99e3b6fca92542e7ca294bbafe82376321d5 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/patterns/issue51636.dart:5:23: Error: Undefined name 'unknownName'.
// int f<A>() => switch (unknownName) {
// ^^^^^^^^^^^
//
import self as self;
import "dart:core" as core;
static method f<A extends core::Object? = dynamic>() core::int
return block {
core::int #t1;
final synthesized invalid-type #0#0 = invalid-expression "pkg/front_end/testcases/patterns/issue51636.dart:5:23: Error: Undefined name 'unknownName'.
int f<A>() => switch (unknownName) {
^^^^^^^^^^^";
function ##0#2#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#2 = ##0#2#initializer(){() → core::int};
#L1:
{
{
if(#0#0 is core::List<self::f::A%> && #0#2.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t1 = 1;
break #L1;
}
}
{
hoisted self::f::A% x;
hoisted core::List<self::f::A%> xs;
if(#0#2.{core::num::>=}(#C2){(core::num) → core::bool} && (let final Never #t2 = x = #0#0.{core::List::[]}(0){(core::int) → self::f::A%} in true) && (let final core::List<Never> #t3 = xs = #0#0.{core::List::sublist}(1){(core::int, [core::int?]) → core::List<self::f::A%>} in true)) {
#t1 = 2;
break #L1;
}
}
}
} =>#t1;
static method main() → void {}
constants {
#C1 = 0
#C2 = 1
}