mirror of
https://github.com/golang/go
synced 2024-11-11 21:50:21 -07:00
test: add test for confusion with dot imports
The gccgo compiler would fail this test. The fix for gccgo is https://golang.org/cl/116960043 . LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/118000043
This commit is contained in:
parent
88b78b41c5
commit
6eb5eb398b
7
test/fixedbugs/bug488.dir/a.go
Normal file
7
test/fixedbugs/bug488.dir/a.go
Normal file
@ -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"
|
9
test/fixedbugs/bug488.dir/b.go
Normal file
9
test/fixedbugs/bug488.dir/b.go
Normal file
@ -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
|
12
test/fixedbugs/bug488.go
Normal file
12
test/fixedbugs/bug488.go
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user