| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/nnbd/switch_redesign_fall_over.dart:23:5: Error: Switch case may fall through to the next case. |
| // case -42: // Error. |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| import "dart:_internal" as _in; |
| |
| abstract class A extends core::Object { |
| synthetic constructor •() → self::A |
| : super core::Object::•() |
| ; |
| method foo(core::int x, core::bool b) → dynamic { |
| switch(x) { |
| #L1: |
| case #C1: |
| { |
| let final Never #t1 = this.{self::A::neverReturn}(){() → Never} in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); |
| } |
| #L2: |
| default: |
| { |
| self::bar(); |
| } |
| } |
| } |
| abstract method neverReturn() → Never; |
| } |
| static method bar() → dynamic {} |
| static method foo(core::int x, core::bool b) → dynamic { |
| switch(x) { |
| #L3: |
| case #C1: |
| { |
| let final Never #t2 = b ?{Never} throw "hest" : throw "fisk" in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); |
| } |
| #L4: |
| case #C2: |
| { |
| self::bar(); |
| } |
| #L5: |
| default: |
| { |
| self::bar(); |
| } |
| } |
| } |
| static method main() → dynamic {} |
| |
| constants { |
| #C1 = 42 |
| #C2 = -42 |
| } |