http://tour.golang.org/#52

On that example, if you press Run it outputs:

prog.go:19: cannot use v (type Vertex) as type Abser in assignment:

Vertex does not implement Abser (Abs method requires pointer receiver)

However, if you change "func (v *Vertex) Abs()" to "func (v Vertex) Abs()" I was expecting it to throw an error on:

a = &v

The inverse of the other error. But it works fine. Can someone please explain to me why this is?

--

You received this message because you are subscribed to the Google Groups "golang-nuts" group.

To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.