Commit f95a311c authored by David du Colombier's avatar David du Colombier

cmd/gc: fix nil pointer dereference

LGTM=iant
R=golang-codereviews, dave, iant
CC=golang-codereviews
https://golang.org/cl/60740044
parent a747adf7
......@@ -3199,7 +3199,7 @@ typecheckdef(Node *n)
n->type->sym = n->sym;
nerrors0 = nerrors;
typecheckdeftype(n);
if(n->type->etype == TFORW && nerrors > nerrors0) {
if(n->type != T && n->type->etype == TFORW && nerrors > nerrors0) {
// Something went wrong during type-checking,
// but it was reported. Silence future errors.
n->type->broke = 1;
......
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