Use BreakOutsideOfLoop instead of Unspecified

Change-Id: Ib420f7d2bb3c47da36f8fa81b4c2c09d319b74e7
Reviewed-on: https://dart-review.googlesource.com/65205
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Brian Wilkerson 2018-07-17 13:23:09 +00:00 committed by commit-bot@chromium.org
parent b571e9391c
commit 6927e30cac
2 changed files with 2 additions and 4 deletions

View file

@ -3689,9 +3689,8 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
target = scope.lookupLabel(name);
}
if (target == null && name == null) {
push(compileTimeErrorInLoopOrSwitch =
deprecated_buildCompileTimeErrorStatement(
"No target of break.", breakKeyword.charOffset));
push(compileTimeErrorInLoopOrSwitch = buildCompileTimeErrorStatement(
fasta.messageBreakOutsideOfLoop, breakKeyword.charOffset));
} else if (target == null ||
target is! JumpTarget ||
!target.isBreakTarget) {

View file

@ -21,7 +21,6 @@ AssertExtraneousArgument/example: Fail
AsyncAsIdentifier/example: Fail
AwaitAsIdentifier/example: Fail
AwaitNotAsync/example: Fail
BreakOutsideOfLoop/script1: Fail
BuiltInIdentifierAsType/example: Fail
BuiltInIdentifierInDeclaration/example: Fail
CannotReadPackagesFile/analyzerCode: Fail