aboutsummaryrefslogtreecommitdiff
path: root/test/interface/pointer.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2020-12-01 17:37:12 -0800
committerRobert Griesemer <gri@golang.org>2020-12-03 17:55:56 +0000
commit7a1aa7dfaf9a7208a6cae7518037d885c9fabdbd (patch)
treeaa509df6b2972df2bb5e86af12d5c5d6a4989c67 /test/interface/pointer.go
parent07d32c8183eb4f7d8d1d6185ea69b8fb0425f6a6 (diff)
downloadgo-7a1aa7dfaf9a7208a6cae7518037d885c9fabdbd.tar.xz
[dev.typeparams] test: adjust more test cases to match compiler -G output
With this CL, the first ~500 errorcheck tests pass when running go run run.go -v -G in the $GOROOT/test directory (the log output includes a few dozen tests that are currently skipped). Change-Id: I9eaa2319fb39a090df54f8699ddc29ffe58b1bf1 Reviewed-on: https://go-review.googlesource.com/c/go/+/274975 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'test/interface/pointer.go')
-rw-r--r--test/interface/pointer.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/interface/pointer.go b/test/interface/pointer.go
index 2927050669..c21e4da390 100644
--- a/test/interface/pointer.go
+++ b/test/interface/pointer.go
@@ -32,7 +32,9 @@ func AddInst(Inst) *Inst {
func main() {
print("call addinst\n")
- var x Inst = AddInst(new(Start)) // ERROR "pointer to interface"
+ var x Inst = AddInst(new(Start)) // ERROR "pointer to interface|incompatible type"
+ _ = x
print("return from addinst\n")
var y *Inst = new(Start) // ERROR "pointer to interface|incompatible type"
+ _ = y
}