Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: test/kernel/regression/switch_execution_case_t02.dart.txt

Issue 2205263002: Implement fall-through errors. (Closed) Base URL: git@github.com:dart-lang/rasta.git@errors
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 {}
OLDNEW
« lib/kernel/fall_through_visitor.dart ('K') | « test/kernel/regression/switch_execution_case_t02.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698