Commit b8dd218e authored by Russ Cox's avatar Russ Cox

bug117 is fixed in 6g; now an errchk

R=r
DELTA=42  (20 added, 22 deleted, 0 changed)
OCL=28295
CL=28295
parent 9cba9c88
......@@ -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};
......
......@@ -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
......
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