recognize methods for a variable whose type is a named type
which is a pointer type. Add bug117 to test this case.
R=r
DELTA=24 (22 added, 0 deleted, 2 changed)
OCL=18547
CL=18554
--- /dev/null
+// errchk $G $D/$F.go
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+type S struct { a int }
+type PS *S
+func (p *S) get() int {
+ return p.a
+}
+func fn(p PS) int {
+ return p.get()
+}
+func main() {
+ s := S{1};
+ if s.get() != 1 {
+ panic()
+ }
+}
out.dat <- dat;
}
-func get(in *dch) item{
+func get(in *dch) *rat {
seqno++;
in.req <- seqno;
return <-in.dat;
Twos = Rep(itor(2));
}
-func check(U PS, c item, count int, str string) {
+func check(U PS, c *rat, count int, str string) {
for i := 0; i < count; i++ {
r := get(U);
if !r.eq(c) {
bugs/bug115.go:8: overflow converting constant to uint
BUG: bug115 should compile
+=========== bugs/bug117.go
+bugs/bug117.go:9: undefined DOT get on PS
+bugs/bug117.go:10: illegal types for operand: RETURN
+ int
+BUG: should compile
+
=========== fixedbugs/bug016.go
fixedbugs/bug016.go:7: overflow converting constant to uint