From 6cd74b03f38de40d84d1d9efe8663714ccfaaee5 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 5 Nov 2008 11:25:30 -0800 Subject: [PATCH] Don't use a named pointer type as a receiver type. The current spec forbids it: The type specified by the type name is called ``receiver base type''. The receiver base type must be a type declared in the current file, and it must not be a pointer type. R=r DELTA=2 (0 added, 0 deleted, 2 changed) OCL=18527 CL=18541 --- test/chan/powser1.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/chan/powser1.go b/test/chan/powser1.go index 4b0aa6128e..6c57894a9b 100644 --- a/test/chan/powser1.go +++ b/test/chan/powser1.go @@ -19,13 +19,13 @@ type rat struct { type item *rat; -func (u item) pr(){ +func (u *rat) pr(){ if u.den==1 { print(u.num) } else { print(u.num, "/", u.den) } print(" ") } -func (u item) eq(c item) bool { +func (u *rat) eq(c item) bool { return u.num == c.num && u.den == c.den } -- 2.50.0