Message ID | CAOyqgcXi4FgLEW9miBLgK3F-KyaSOCiumNL2MA8y3QLCtoPoMg@mail.gmail.com |
---|---|
State | New |
Headers | show |
diff -r 547a3bf5788a go/types.cc --- a/go/types.cc Fri Nov 21 10:21:33 2014 -0800 +++ b/go/types.cc Mon Nov 24 09:05:18 2014 -0800 @@ -10035,6 +10035,18 @@ if (found_level == 0) return false; + else if (found_is_method + && type->named_type() != NULL + && type->points_to() != NULL) + { + // If this is a method inherited from a struct field in a named pointer + // type, it is invalid to automatically dereference the pointer to the + // struct to find this method. + if (level != NULL) + *level = found_level; + *is_method = true; + return false; + } else if (!found_ambig1.empty()) { go_assert(!found_ambig1.empty());