From: Ian Lance Taylor Date: Thu, 6 Dec 2012 04:32:12 +0000 (-0800) Subject: test: add some tests where go/defer arg starts with parenthesis X-Git-Tag: go1.1rc2~1708 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b46d56ae7215ca1f56f4556f76408bab26a85669;p=gostls13.git test: add some tests where go/defer arg starts with parenthesis R=gri CC=golang-dev https://golang.org/cl/6890047 --- diff --git a/test/fixedbugs/issue4468.go b/test/fixedbugs/issue4468.go index c9d7699e26..ef0b46bcf6 100644 --- a/test/fixedbugs/issue4468.go +++ b/test/fixedbugs/issue4468.go @@ -8,7 +8,21 @@ package p +type T int + +func (t *T) F() T { + return *t +} + +type S struct { + t T +} + func F() { go (F()) // ERROR "must be function call" defer (F()) // ERROR "must be function call" + var s S + (&s.t).F() + go (&s.t).F() + defer (&s.t).F() }