mirror of
https://github.com/golang/go
synced 2024-11-19 23:04:40 -07:00
gc: issue 901
Fixes #901. R=ken2 CC=golang-dev https://golang.org/cl/1674049
This commit is contained in:
parent
08a263a991
commit
31c07dfddf
@ -281,6 +281,13 @@ walkdef(Node *n)
|
|||||||
if(n->defn == N) {
|
if(n->defn == N) {
|
||||||
if(n->etype != 0) // like OPRINTN
|
if(n->etype != 0) // like OPRINTN
|
||||||
break;
|
break;
|
||||||
|
if(nerrors > 0) {
|
||||||
|
// Can have undefined variables in x := foo
|
||||||
|
// that make x have an n->ndefn == nil.
|
||||||
|
// If there are other errors anyway, don't
|
||||||
|
// bother adding to the noise.
|
||||||
|
break;
|
||||||
|
}
|
||||||
fatal("var without type, init: %S", n->sym);
|
fatal("var without type, init: %S", n->sym);
|
||||||
}
|
}
|
||||||
if(n->defn->op == ONAME) {
|
if(n->defn->op == ONAME) {
|
||||||
|
Loading…
Reference in New Issue
Block a user