diff options
author | Russ Cox <rsc@golang.org> | 2011-06-17 06:07:13 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-06-17 06:07:13 -0400 |
commit | 62d72154691ecb86c9ac6f844c82204b45769e10 (patch) | |
tree | 3aa137c92fbef8d8acac1eeaddce83d3d6fb3b36 /test | |
parent | 99530d46c3fa6e6e987d1f8b1980de27c22bce58 (diff) | |
download | go-62d72154691ecb86c9ac6f844c82204b45769e10.tar.gz |
respect goto restrictions
R=gri
CC=golang-dev
http://codereview.appspot.com/4625044
Diffstat (limited to 'test')
-rw-r--r-- | test/fixedbugs/bug140.go | 4 | ||||
-rw-r--r-- | test/fixedbugs/bug178.go | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/test/fixedbugs/bug140.go b/test/fixedbugs/bug140.go index e27b370e7..441c57a48 100644 --- a/test/fixedbugs/bug140.go +++ b/test/fixedbugs/bug140.go @@ -10,14 +10,14 @@ func main() { if true { } else { L1: + goto L1 } if true { } else { + goto L2 L2: main() } - goto L1 - goto L2 } /* diff --git a/test/fixedbugs/bug178.go b/test/fixedbugs/bug178.go index 205961024..a7ff09dae 100644 --- a/test/fixedbugs/bug178.go +++ b/test/fixedbugs/bug178.go @@ -14,6 +14,9 @@ L: break L } panic("BUG: not reached - break") + if false { + goto L1 + } } L2: @@ -23,11 +26,8 @@ L2: continue L2 } panic("BUG: not reached - continue") - } - if false { - goto L1 - } - if false { - goto L3 + if false { + goto L3 + } } } |