blob: 46d587751f991de2e70c5246827a04262a46bcbe [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/rasta/switch_fall_through2.dart:31:5: Error: Switch case may fall through to the next case.
// case 5:
// ^
//
import self as self;
import "dart:core" as core;
static method main() dynamic {
#L1:
switch(1) {
#L2:
case #C1:
{
{
"No fall-through error needed.";
break #L1;
;
}
}
#L3:
case #C2:
{
{
"Fall-through error needed.";
if(true) {
break #L1;
}
}
}
#L4:
case #C3:
{
try {
"No fall-through error needed.";
}
finally {
break #L1;
}
}
#L5:
case #C4:
{
try {
"No fall-through error needed.";
break #L1;
}
finally {
}
}
#L6:
case #C5:
{
try {
"Fall-through error needed.";
}
finally {
}
}
#L7:
case #C6:
{
"Should be last. No fall-through error, falling through allowed here.";
}
}
}
constants {
#C1 = 1
#C2 = 2
#C3 = 3
#C4 = 4
#C5 = 5
#C6 = 10000
}