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 | 917aa35f8ff95052459538c2e5bae80d1c9a307e (patch) | |
tree | ac8aca82e0cdf34df99f8ef940c5ccd74117e926 /test/import.go | |
parent | cd3ab57a9c2d6088ad1deef97786d5b9f01343f6 (diff) | |
download | go-917aa35f8ff95052459538c2e5bae80d1c9a307e.tar.gz go-917aa35f8ff95052459538c2e5bae80d1c9a307e.zip |
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 0000000000..9bed8213cc --- /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); +} + |