diff options
author | Ian Lance Taylor <iant@golang.org> | 2014-07-20 10:28:51 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2014-07-20 10:28:51 -0700 |
commit | 9d62d162ebf74faefa4bfbec23d14ba11bcbf4b6 (patch) | |
tree | 0c651fea9efc70631eba557629be8673abc3c363 /test | |
parent | 53a7c726e54565f18fbcb7e81d57abc29690dc8c (diff) | |
download | go-9d62d162ebf74faefa4bfbec23d14ba11bcbf4b6.tar.gz |
test: add test for confusion with dot imports
The gccgo compiler would fail this test. The fix for gccgo is
http://codereview.appspot.com/116960043 .
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/118000043
Diffstat (limited to 'test')
-rw-r--r-- | test/fixedbugs/bug488.dir/a.go | 7 | ||||
-rw-r--r-- | test/fixedbugs/bug488.dir/b.go | 9 | ||||
-rw-r--r-- | test/fixedbugs/bug488.go | 12 |
3 files changed, 28 insertions, 0 deletions
diff --git a/test/fixedbugs/bug488.dir/a.go b/test/fixedbugs/bug488.dir/a.go new file mode 100644 index 000000000..94eaf7f1e --- /dev/null +++ b/test/fixedbugs/bug488.dir/a.go @@ -0,0 +1,7 @@ +// 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 a + +var p2 = Printf // ERROR "undefined" diff --git a/test/fixedbugs/bug488.dir/b.go b/test/fixedbugs/bug488.dir/b.go new file mode 100644 index 000000000..21b4c5b54 --- /dev/null +++ b/test/fixedbugs/bug488.dir/b.go @@ -0,0 +1,9 @@ +// 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 a + +import . "fmt" + +var p1 = Print diff --git a/test/fixedbugs/bug488.go b/test/fixedbugs/bug488.go new file mode 100644 index 000000000..63a601ed9 --- /dev/null +++ b/test/fixedbugs/bug488.go @@ -0,0 +1,12 @@ +// errorcheckdir + +// 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. + +// The gccgo compiler had a bug: if one file in a package did a dot +// import, then an earlier file in the package would incorrectly +// resolve to the imported names rather than reporting undefined +// errors. + +package ignored |