Fixes https://code.google.com/p/go/issues/detail?id=8583.
From-SVN: r214560
else
go_unreachable();
go_assert(m != NULL);
- if (dereferenced && m->is_value_method())
+ if (dereferenced)
{
error_at(location,
- "calling value method requires explicit dereference");
+ "calling method %qs requires explicit dereference",
+ Gogo::message_name(name).c_str());
return Expression::make_error(location);
}
if (!m->is_value_method() && expr->type()->points_to() == NULL)
package main
-type T struct {}
+type T struct{}
func (t *T) pm() {}
-func (t T) m() {}
+func (t T) m() {}
func main() {
p := &T{}
q := &p
q.m() // ERROR "requires explicit dereference"
- q.pm()
+ q.pm() // ERROR "requires explicit dereference"
}