diff options
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" } |