| 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; | |
| 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 : let final dynamic #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 : let final dynamic #t3 = #0#1#isSet = true in #0#1 = self::Extension|get#getter(#0#0); | |
| #t1 = 0; | |
| break #L1; | |
| } | |
| } | |
| } | |
| } =>#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 : let final dynamic #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 : let final dynamic #t6 = #0#1#isSet = true in #0#1 = self::Extension|get#getter(#0#0)) as{Unchecked} core::int; | |
| #t4 = 0; | |
| break #L2; | |
| } | |
| } | |
| } | |
| } =>#t4; |