diff options
author | Russ Cox <rsc@golang.org> | 2009-05-08 15:40:14 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-05-08 15:40:14 -0700 |
commit | bfd9bcac96aa974b273dd0fb9931ff83feb2c6ab (patch) | |
tree | ac8aca82e0cdf34df99f8ef940c5ccd74117e926 /test/import.go | |
parent | 61b147cb2187dff8c109570740e81951d7fdc5f5 (diff) | |
download | go-bfd9bcac96aa974b273dd0fb9931ff83feb2c6ab.tar.gz |
implications of stricter type equality:
if both types are named, they must be
the same type (arising from the same
declaration).
R=r,gri
DELTA=44 (21 added, 4 deleted, 19 changed)
OCL=28436
CL=28577
Diffstat (limited to 'test/import.go')
-rw-r--r-- | test/import.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/import.go b/test/import.go new file mode 100644 index 000000000..9bed8213c --- /dev/null +++ b/test/import.go @@ -0,0 +1,25 @@ +// $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. + +// check that when import gives multiple names +// to a type, they're still all the same type + +package main + +import _os_ "os" +import "os" +import . "os" + +func f(e os.Error) + +func main() { + var _e_ _os_.Error; + var dot Error; + + f(_e_); + f(dot); +} + |