Commit 6a401339 authored by Luuk van Dijk's avatar Luuk van Dijk

gc: suppress non-root cause message for bad receivers.

Fixed issue 2500

R=rsc
CC=golang-dev
https://golang.org/cl/5485053
parent c8a5f884
......@@ -1273,6 +1273,8 @@ addmethod(Sym *sf, Type *t, int local)
t = t->type;
}
}
if(t->broke) // rely on typecheck having complained before
return;
if(t != T) {
if(t->sym == S) {
yyerror("invalid receiver type %T (%T is an unnamed type)", pa, t);
......
// errchk $G $D/$F.go
// 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.
// Issue 2500
package foo
// Check that we only get root cause message, no further complaints about r undefined
func (r *indexWriter) foo() {} // ERROR "undefined.*indexWriter"
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