]> Cypherpunks repositories - gostls13.git/commitdiff
add bug to capture double declaration of name in file and package block
authorRob Pike <r@golang.org>
Thu, 20 Aug 2009 00:37:23 +0000 (17:37 -0700)
committerRob Pike <r@golang.org>
Thu, 20 Aug 2009 00:37:23 +0000 (17:37 -0700)
R=rsc
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=33554
CL=33563

test/fixedbugs/bug192.go [new file with mode: 0644]
test/golden.out

diff --git a/test/fixedbugs/bug192.go b/test/fixedbugs/bug192.go
new file mode 100644 (file)
index 0000000..0131a51
--- /dev/null
@@ -0,0 +1,11 @@
+// errchk $G $D/$F.go
+
+// 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
+
+import "fmt"
+
+var fmt int    // ERROR "redecl"
index 1c4981b352bbf4829e25fc637f907bac1460270f..69a55d2d554f1cc5ddba47e33385b6d8801d171a 100644 (file)
@@ -168,3 +168,4 @@ bugs/bug190.go:13: invalid recursive type chan S
 bugs/bug190.go:16: invalid recursive type S
 bugs/bug190.go:15: invalid recursive type func(S) (S)
 BUG: should compile
+bugs/bug191.go succeeded with no output.