1
0
mirror of https://github.com/golang/go synced 2024-11-25 05:27:57 -07:00

Don't use fallthrough in a type switch.

R=rsc
http://go/go-review/1018005
This commit is contained in:
Ian Lance Taylor 2009-10-30 16:10:42 -07:00
parent fb12ad063e
commit b534eb462b

View File

@ -111,12 +111,10 @@ func (w *World) CompileExpr(e ast.Expr) (Code, os.Error) {
// nothing
case *idealFloatType:
// nothing
case *MultiType:
if len(t.Elems) == 0 {
default:
if tm, ok := t.(*MultiType); ok && len(tm.Elems) == 0 {
return &stmtCode{w, code{ec.exec}}, nil;
}
fallthrough;
default:
eval = genAssign(ec.t, ec);
}
return &exprCode{w, ec, eval}, nil;