1
0
mirror of https://github.com/golang/go synced 2024-11-21 19:04:44 -07:00

Tweak test to work with both 6g and gccgo.

Pull the struct into a single line, since 6g reports the error
on the last line of the struct definition and gccgo reports it
on the first line.

6g:
bug215.go:12: invalid recursive type A

gccgo:
bug215.go:12:6: error: invalid recursive type ‘A’

R=rsc
https://golang.org/cl/180044
This commit is contained in:
Ian Lance Taylor 2009-12-15 13:57:24 -08:00
parent 8274742393
commit 84e7cb0611

View File

@ -9,8 +9,6 @@
package main
type A struct {
a A;
} // ERROR "recursive"
type A struct { a A } // ERROR "recursive"
func foo() { new(A).bar() }
func (a A) bar() {}