Analyzer complains about switch statements #21822
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
This issue was originally filed by briangepper...@briangeppert.com
What steps will reproduce the problem?
void toggle() {
switch(this.state) {
case 'play': {
this.state = this.pauseDisabled ? 'stop' : 'pause';
break;
}
case 'pause': {
this.state = 'stop';
break;
}
case 'stop': {
this.state = 'play';
break;
}
}
}
What is the expected output? What do you see instead?
I'd expect the analyzer to detect that each branch ends in a 'break'. It does not.
What version of the product are you using?
Chrome Dev Editor (0.18.3450).
On what operating system?
Windows 8.
What browser (if applicable)?
Chrome 39.
The text was updated successfully, but these errors were encountered: