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 | 11fe8b7e8f91d754ec7f4676f8c3df98d7266dfd (patch) | |
tree | ac8aca82e0cdf34df99f8ef940c5ccd74117e926 /test/import.go | |
parent | fdee600cb35efb522e7976a5acd95ec3e2c6773b (diff) | |
download | golang-11fe8b7e8f91d754ec7f4676f8c3df98d7266dfd.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); +} + |