Files
sdk/pkg/front_end/testcases/inference/switch_continue.dart.direct.expect
T
Paul Berry 2f7c6d61f5 Add type inference for break and continue statements.
Note that no actual type inference needs to be performed, but we still
need to implement the _inferStatement() methods so that we can get rid
of the hack in KernelTypeInferrer.inferStatement.  Also, we need to
call into the listener so that once this logic is hooked into
AstBuilder, analyzer will stay in sync with type inference.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2962583002 .
2017-06-26 14:51:07 -07:00

23 lines
336 B
Plaintext

library test;
import self as self;
import "dart:core" as core;
static method test(core::int x, () → void f) → void {
#L1:
switch(x) {
#L2:
case 0:
{
f.call();
continue #L3;
}
#L3:
case 1:
{
f.call();
break #L1;
}
}
}
static method main() → dynamic {}