diff options
author | Russ Cox <rsc@golang.org> | 2009-05-05 13:41:46 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-05-05 13:41:46 -0700 |
commit | f782111b5d0d86fa86b90d934d29d8da8aaa76c0 (patch) | |
tree | 707b706424bc45802b79b79c04e26e5d8eb2bb75 /test | |
parent | 163bd8ee66869a7bdf6c81c855a46f366fe06607 (diff) | |
download | golang-f782111b5d0d86fa86b90d934d29d8da8aaa76c0.tar.gz |
bug117 is fixed in 6g; now an errchk
R=r
DELTA=42 (20 added, 22 deleted, 0 changed)
OCL=28295
CL=28295
Diffstat (limited to 'test')
-rw-r--r-- | test/fixedbugs/bug117.go (renamed from test/bugs/bug117.go) | 6 | ||||
-rw-r--r-- | test/golden.out | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/test/bugs/bug117.go b/test/fixedbugs/bug117.go index a18e68849..cc3ac34ce 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 72680adea..223aa9614 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 |