summaryrefslogtreecommitdiff
path: root/test/fixedbugs/bug139.go
diff options
context:
space:
mode:
authorKen Thompson <ken@golang.org>2009-04-28 13:52:56 -0700
committerKen Thompson <ken@golang.org>2009-04-28 13:52:56 -0700
commit1fe2eeac56c4c3e787274f05004200f201ef9f73 (patch)
tree5801a096dad5e53c6971376ed1f7f17528f38c72 /test/fixedbugs/bug139.go
parent71e93d36107b5dc959d8488642a730888c5a3252 (diff)
downloadgo-1fe2eeac56c4c3e787274f05004200f201ef9f73.tar.gz
bug 139
R=r OCL=27987 CL=27987
Diffstat (limited to 'test/fixedbugs/bug139.go')
-rw-r--r--test/fixedbugs/bug139.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/fixedbugs/bug139.go b/test/fixedbugs/bug139.go
new file mode 100644
index 000000000..2bdbef1c0
--- /dev/null
+++ b/test/fixedbugs/bug139.go
@@ -0,0 +1,17 @@
+// $G $D/$F.go || echo BUG should compile
+
+// Copyright 2009 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 main
+
+func main() {
+ x := false;
+ func () { if x { println(1); } }(); // this does not compile
+ func () { if x == false { println(2); } }(); // this works as expected
+}
+
+/*
+bug139.go:7: fatal error: naddr: ONAME class x 5
+*/