Commit 31c07dfd authored by Russ Cox's avatar Russ Cox

gc: issue 901

Fixes #901.

R=ken2
CC=golang-dev
https://golang.org/cl/1674049
parent 08a263a9
......@@ -281,6 +281,13 @@ walkdef(Node *n)
if(n->defn == N) {
if(n->etype != 0) // like OPRINTN
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);
}
if(n->defn->op == ONAME) {
......
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