-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/types: propagate *ast.LabeledStmt in blockBranches properly
Fixes #70974 Change-Id: I330c0ae53dcbcdb173ab514ee94f2ca53944df09 GitHub-Last-Rev: 7c2b740da6d6e94ac8787f04ad8942f3776ac56c GitHub-Pull-Request: golang/go#70976 Reviewed-on: https://go-review.googlesource.com/c/go/+/638257 Reviewed-by: Michael Knyszek <[email protected]> Auto-Submit: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Commit-Queue: Alan Donovan <[email protected]> Reviewed-by: Alan Donovan <[email protected]>
- Loading branch information
1 parent
df029fa
commit 25016f4
Showing
4 changed files
with
71 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2014 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package p | ||
|
||
func _() { | ||
outer: | ||
inner: | ||
for { | ||
continue inner | ||
break inner | ||
} | ||
goto outer | ||
} | ||
|
||
func _() { | ||
outer: | ||
inner: | ||
for { | ||
continue inner | ||
continue outer /* ERROR "invalid continue label outer" */ | ||
break outer /* ERROR "invalid break label outer" */ | ||
} | ||
goto outer | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2014 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package p | ||
|
||
func _() { | ||
outer: | ||
for { | ||
break outer | ||
} | ||
|
||
for { | ||
break outer /* ERROR "invalid break label outer" */ | ||
} | ||
} | ||
|
||
func _() { | ||
outer: | ||
for { | ||
continue outer | ||
} | ||
|
||
for { | ||
continue outer /* ERROR "invalid continue label outer" */ | ||
} | ||
} |