1
0
mirror of https://github.com/golang/go synced 2024-11-21 20:34:40 -07:00

test: Match gccgo error messages.

undef.go:12:6: error: reference to undefined name ‘x’
undef.go:13:6: error: reference to undefined name ‘x’
undef.go:14:6: error: reference to undefined name ‘x’
undef.go:22:25: error: reference to undefined name ‘y’
undef.go:42:11: error: reference to undefined name ‘v’

R=rsc
CC=golang-dev
https://golang.org/cl/2152045
This commit is contained in:
Ian Lance Taylor 2010-09-10 12:44:37 -07:00
parent b2d540acac
commit d1b434b839

View File

@ -9,9 +9,9 @@
package main package main
var ( var (
_ = x // ERROR "undefined: x" _ = x // ERROR "undefined.*x"
_ = x // ERROR "undefined: x" _ = x // ERROR "undefined.*x"
_ = x // ERROR "undefined: x" _ = x // ERROR "undefined.*x"
) )
type T struct { type T struct {
@ -19,7 +19,7 @@ type T struct {
} }
func foo() *T { return &T{y: 99} } func foo() *T { return &T{y: 99} }
func bar() int { return y } // ERROR "undefined: y" func bar() int { return y } // ERROR "undefined.*y"
type T1 struct { type T1 struct {
y1 int y1 int
@ -39,6 +39,6 @@ func f1(val interface{}) {
func f2(val interface{}) { func f2(val interface{}) {
switch val.(type) { switch val.(type) {
default: default:
println(v) // ERROR "undefined: v" println(v) // ERROR "undefined.*v"
} }
} }