Commit 6cd74b03 authored by Ian Lance Taylor's avatar Ian Lance Taylor

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
parent 44a82746
......@@ -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
}
......
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