Commit b46d56ae authored by Ian Lance Taylor's avatar Ian Lance Taylor

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

R=gri
CC=golang-dev
https://golang.org/cl/6890047
parent 5416e6e9
......@@ -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()
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment