]> Cypherpunks repositories - gostls13.git/commitdiff
bug117 is fixed in 6g; now an errchk
authorRuss Cox <rsc@golang.org>
Tue, 5 May 2009 20:41:46 +0000 (13:41 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 5 May 2009 20:41:46 +0000 (13:41 -0700)
R=r
DELTA=42  (20 added, 22 deleted, 0 changed)
OCL=28295
CL=28295

test/fixedbugs/bug117.go [moved from test/bugs/bug117.go with 66% similarity]
test/golden.out

similarity index 66%
rename from test/bugs/bug117.go
rename to test/fixedbugs/bug117.go
index a18e68849aa63f13f51c8ae525cc5da11e9259a2..cc3ac34ce98da4d126e00adacae5fabf04458f10 100644 (file)
@@ -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};
index 72680adea32fea3ae7f5dee0491f617e69d989a2..223aa96144e5e75a9db78b5e0bff3aab88139d13 100644 (file)
@@ -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