Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 library; | |
| 2 import self as self; | |
| 3 import "dart:core" as core; | |
| 4 | |
| 5 static method test(dynamic value) → dynamic { | |
| 6 dynamic result; | |
| 7 #L1: | |
| 8 switch(value) { | |
| 9 #L2: | |
| 10 case 1: | |
| 11 { | |
| 12 result = 1; | |
| 13 break #L1; | |
| 14 } | |
| 15 #L3: | |
| 16 case 2: | |
| 17 { | |
| 18 result = 2; | |
| 19 throw core::_fallThroughError(); | |
| 20 } | |
| 21 #L4: | |
| 22 case 3: | |
| 23 { | |
| 24 result = 3; | |
| 25 throw core::_fallThroughError(); | |
| 26 } | |
| 27 #L5: | |
| 28 default: | |
| 29 { | |
| 30 result = 4; | |
| 31 throw core::_fallThroughError(); | |
| 32 } | |
| 33 } | |
| 34 return result; | |
| 35 } | |
| 36 static method testEmptyCases(dynamic value) → dynamic { | |
| 37 dynamic result; | |
| 38 #L6: | |
| 39 switch(value) { | |
| 40 #L7: | |
| 41 case 1: | |
| 42 case 2: | |
| 43 { | |
| 44 result = 1; | |
| 45 throw core::_fallThroughError(); | |
| 46 } | |
| 47 #L8: | |
| 48 case 3: | |
| 49 case 4: | |
| 50 { | |
| 51 result = 2; | |
| 52 break #L6; | |
| 53 } | |
| 54 #L9: | |
| 55 case 5: | |
| 56 case 6: | |
| 57 default: | |
| 58 throw core::_fallThroughError(); | |
| 59 } | |
| 60 return result; | |
| 61 } | |
| 62 static method main() → dynamic {} | |
| OLD | NEW |