@@ -480,8 +480,10 @@ generateCase tcc expr branches =
480480 case expr of
481481 A.A _ (Var (Var.Canonical Var.Local x)) ->
482482 return (Case.matchSubst [(tempVar, Var.safe x)] initialMatch, [])
483+
483484 A.A _ (Var (Var.Canonical (Var.TopLevel _) x)) ->
484485 return (Case.matchSubst [(tempVar, Var.safe x)] initialMatch, [])
486+
485487 _ ->
486488 do expr' <- toJsExpr expr
487489 return (initialMatch, [VarDeclStmt () [varDecl tempVar expr']])