1
0
mirror of https://github.com/golang/go synced 2024-11-21 14:44:40 -07:00

compiler fatal error in switch.

fixes #867.

R=rsc
CC=golang-dev
https://golang.org/cl/1691045
This commit is contained in:
Ken Thompson 2010-06-28 16:30:55 -07:00
parent ea88de805e
commit 2795282b50

View File

@ -777,11 +777,12 @@ typeswitch(Node *sw)
// binary search among cases to narrow by hash
cas = list(cas, typebsw(c1, ncase));
}
cas = list(cas, def);
sw->nbody = concat(cas, sw->nbody);
sw->list = nil;
walkstmtlist(sw->nbody);
if(nerrors == 0) {
cas = list(cas, def);
sw->nbody = concat(cas, sw->nbody);
sw->list = nil;
walkstmtlist(sw->nbody);
}
}
void