diff options
| author | Ondřej Surý <ondrej@sury.org> | 2012-04-06 15:14:11 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2012-04-06 15:14:11 +0200 |
| commit | 505c19580e0f43fe5224431459cacb7c21edd93d (patch) | |
| tree | 79e2634c253d60afc0cc0b2f510dc7dcbb48497b /test/interface/pointer.go | |
| parent | 1336a7c91e596c423a49d1194ea42d98bca0d958 (diff) | |
| download | golang-505c19580e0f43fe5224431459cacb7c21edd93d.tar.gz | |
Imported Upstream version 1upstream/1
Diffstat (limited to 'test/interface/pointer.go')
| -rw-r--r-- | test/interface/pointer.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/interface/pointer.go b/test/interface/pointer.go index fe4d8e3ef..292705066 100644 --- a/test/interface/pointer.go +++ b/test/interface/pointer.go @@ -1,10 +1,11 @@ -// errchk $G $D/$F.go +// errorcheck // 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 interface{M()} = *interface{M()} produces a compiler error. +// Test that interface{M()} = *interface{M()} produces a compiler error. +// Does not compile. package main @@ -33,5 +34,5 @@ func main() { print("call addinst\n") var x Inst = AddInst(new(Start)) // ERROR "pointer to interface" print("return from addinst\n") - var y *Inst = new(Start) // ERROR "pointer to interface" + var y *Inst = new(Start) // ERROR "pointer to interface|incompatible type" } |
