on master help sign in
Fix TCE behind destructuring

Fix https://github.com/elm-lang/elm-compiler/issues/1708

commit51b10b028406a5e222ad31921af8981a51b1b5fd authorEvan Czaplicki <evancz@users.noreply.github.com> dateTue 22 May 2018, 11:37 (8 years ago) parent9cd628c
1 file changed+1−1
compiler/src/Optimize/Expression.hs+1−1
compiler/src/Optimize/Expression.hs+1−1
@@ -402,7 +402,7 @@ optimizeTail cycle rootName argNames locExpr@(A.At _ expression) =
402402 Can.LetDestruct pattern expr body ->
403403 do (dname, destructors) <- destruct pattern
404404 oexpr <- optimize cycle expr
405− obody <- optimizeTail cycle dname argNames body
405+ obody <- optimizeTail cycle rootName argNames body
406406 pure $
407407 Opt.Let (Opt.Def dname oexpr) (foldr Opt.Destruct obody destructors)
408408