Commit 2795282b authored by Ken Thompson's avatar Ken Thompson

compiler fatal error in switch.

fixes #867.

R=rsc
CC=golang-dev
https://golang.org/cl/1691045
parent ea88de80
......@@ -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
......
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