blob: b53ad073371f94903cbfd71b484786808da24bf1 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/patterns/extension_object_pattern.dart:13:27: Error: The type 'int' is not exhaustively matched by the switch cases since it doesn't match 'int(getter: double())'.
// Try adding a wildcard pattern or cases that match 'int(getter: double())'.
// method2(int i) => switch (i) /* Error */ {
// ^
//
import self as self;
import "dart:core" as core;
import "dart:_internal" as _in;
extension Extension on core::int {
get getter = self::Extension|get#getter;
}
static extension-member method Extension|get#getter(lowered final core::int #this) → core::num
return #this;
static method method1(core::int i) dynamic
return block {
core::int #t1;
final synthesized core::int #0#0 = i;
synthesized core::num #0#1;
synthesized core::bool #0#1#isSet = false;
#L1:
{
{
hoisted core::num getter;
if((#0#1#isSet ?{core::num} #0#1{core::num} : let final core::bool #t2 = #0#1#isSet = true in #0#1 = self::Extension|get#getter(#0#0)) is core::num) {
getter = #0#1#isSet ?{core::num} #0#1{core::num} : let final core::bool #t3 = #0#1#isSet = true in #0#1 = self::Extension|get#getter(#0#0);
#t1 = 0;
break #L1;
}
}
throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch expression with a non-nullable type.");
}
} =>#t1;
static method method2(core::int i) dynamic
return block {
core::int #t4;
final synthesized core::int #0#0 = i;
synthesized core::num #0#1;
synthesized core::bool #0#1#isSet = false;
#L2:
{
{
hoisted core::int getter;
if((#0#1#isSet ?{core::num} #0#1{core::num} : let final core::bool #t5 = #0#1#isSet = true in #0#1 = self::Extension|get#getter(#0#0)) is core::int) {
getter = (#0#1#isSet ?{core::num} #0#1{core::num} : let final core::bool #t6 = #0#1#isSet = true in #0#1 = self::Extension|get#getter(#0#0)) as{Unchecked} core::int;
#t4 = 0;
break #L2;
}
}
throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch expression with a non-nullable type.");
}
} =>#t4;