1
0
mirror of https://github.com/golang/go synced 2024-11-25 06:57:58 -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,12 +777,13 @@ typeswitch(Node *sw)
// binary search among cases to narrow by hash // binary search among cases to narrow by hash
cas = list(cas, typebsw(c1, ncase)); cas = list(cas, typebsw(c1, ncase));
} }
if(nerrors == 0) {
cas = list(cas, def); cas = list(cas, def);
sw->nbody = concat(cas, sw->nbody); sw->nbody = concat(cas, sw->nbody);
sw->list = nil; sw->list = nil;
walkstmtlist(sw->nbody); walkstmtlist(sw->nbody);
} }
}
void void
walkswitch(Node *sw) walkswitch(Node *sw)