-534fb907c821b052dc430330708d7fa555b91fe3
+68b1c7659a6b25d537a4ff3365ab070fa6215b0b
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
ambig2.c_str());
else if (found_pointer_method)
go_error_at(location, "method requires a pointer receiver");
+ else if (it != NULL && it->is_empty())
+ go_error_at(location,
+ "reference to method %qs in interface with no methods",
+ Gogo::message_name(name).c_str());
+ else if (it == NULL && type->deref()->interface_type() != NULL)
+ go_error_at(location,
+ ("reference to method %qs in type that is "
+ "pointer to interface, not interface"),
+ Gogo::message_name(name).c_str());
else if (nt == NULL && st == NULL && it == NULL)
go_error_at(location,
("reference to field %qs in object which "
// errorcheck
-// Copyright 2011 The Go Authors. All rights reserved.
+// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
var x interface{}
switch t := x.(type) {
case 0: // ERROR "type"
- t.x = 1 // ERROR "type interface \{\}|reference to undefined field or method"
+ t.x = 1 // ERROR "type interface \{\}|reference to undefined field or method|interface with no methods"
}
}