From: Russ Cox Date: Tue, 5 May 2009 20:41:46 +0000 (-0700) Subject: bug117 is fixed in 6g; now an errchk X-Git-Tag: weekly.2009-11-06~1712 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b8dd218e2e3990de7645755ce3d182b01929b98f;p=gostls13.git bug117 is fixed in 6g; now an errchk R=r DELTA=42 (20 added, 22 deleted, 0 changed) OCL=28295 CL=28295 --- diff --git a/test/bugs/bug117.go b/test/fixedbugs/bug117.go similarity index 66% rename from test/bugs/bug117.go rename to test/fixedbugs/bug117.go index a18e68849a..cc3ac34ce9 100644 --- a/test/bugs/bug117.go +++ b/test/fixedbugs/bug117.go @@ -10,8 +10,12 @@ type PS *S func (p *S) get() int { return p.a } + func fn(p PS) int { - return p.get() + // p has type PS, and PS has no methods. + // (a compiler might see that p is a pointer + // and go looking in S without noticing PS.) + return p.get() // ERROR "undefined DOT" } func main() { s := S{1}; diff --git a/test/golden.out b/test/golden.out index 72680adea3..223aa96144 100644 --- a/test/golden.out +++ b/test/golden.out @@ -85,12 +85,6 @@ abcxyz-abcxyz-abcxyz-abcxyz-abcxyz-abcxyz-abcxyz =========== chan/nonblock.go PASS -=========== bugs/bug117.go -bugs/bug117.go:9: undefined DOT get on PS -bugs/bug117.go:9: illegal types for operand: RETURN - int -BUG: should compile - =========== bugs/bug132.go BUG: compilation succeeds incorrectly