test: add some tests where go/defer arg starts with parenthesis

R=gri
CC=golang-dev
https://golang.org/cl/6890047
This commit is contained in:
Ian Lance Taylor 2012-12-05 20:32:12 -08:00
parent 5416e6e916
commit b46d56ae72

View File

@ -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()
}