diff options
author | Russ Cox <rsc@golang.org> | 2013-01-02 15:34:28 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2013-01-02 15:34:28 -0500 |
commit | 51ec4e0248794e3a96390d02285875ad6b90505b (patch) | |
tree | e6705da5c61ab5fcfb5058f1c2e3e7626613c279 /test | |
parent | 22ec0d37b101267e0c01536d0dd869d7b0a9ad5f (diff) | |
download | go-51ec4e0248794e3a96390d02285875ad6b90505b.tar.gz |
cmd/gc: make redeclaration between import and func less confusing
Fixes issue 4510.
R=ken2
CC=golang-dev
https://codereview.appspot.com/7001054
Diffstat (limited to 'test')
-rw-r--r-- | test/fixedbugs/issue4510.dir/f1.go | 9 | ||||
-rw-r--r-- | test/fixedbugs/issue4510.dir/f2.go | 7 | ||||
-rw-r--r-- | test/fixedbugs/issue4510.go | 7 |
3 files changed, 23 insertions, 0 deletions
diff --git a/test/fixedbugs/issue4510.dir/f1.go b/test/fixedbugs/issue4510.dir/f1.go new file mode 100644 index 000000000..1e642e4ce --- /dev/null +++ b/test/fixedbugs/issue4510.dir/f1.go @@ -0,0 +1,9 @@ +// Copyright 2012 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 + +import "fmt" // ERROR "fmt redeclared" + +var _ = fmt.Printf diff --git a/test/fixedbugs/issue4510.dir/f2.go b/test/fixedbugs/issue4510.dir/f2.go new file mode 100644 index 000000000..895fc342b --- /dev/null +++ b/test/fixedbugs/issue4510.dir/f2.go @@ -0,0 +1,7 @@ +// Copyright 2012 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 fmt() {} diff --git a/test/fixedbugs/issue4510.go b/test/fixedbugs/issue4510.go new file mode 100644 index 000000000..003f9e8e1 --- /dev/null +++ b/test/fixedbugs/issue4510.go @@ -0,0 +1,7 @@ +// errorcheckdir + +// Copyright 2012 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 ignored |