From b534eb462b955d96deff94b891b5bd2582d07eb3 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 30 Oct 2009 16:10:42 -0700 Subject: [PATCH] Don't use fallthrough in a type switch. R=rsc http://go/go-review/1018005 --- src/pkg/exp/eval/world.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pkg/exp/eval/world.go b/src/pkg/exp/eval/world.go index a5e4e6092be..331aa308746 100644 --- a/src/pkg/exp/eval/world.go +++ b/src/pkg/exp/eval/world.go @@ -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;