on master help sign in
Update tests for new pattern matching code gen
commitebcab43aa7501201fcf968a3009df93819b29f38 authorEvan Czaplicki <info@elm-lang.org> dateFri 9 Oct 2015, 03:36 (11 years ago) parent81566e2
2 files changed+7−10
tests/test-files/good-expected-js/CaseExpression3.elm.js+3−5 tests/test-files/good-expected-js/TailRecursive.elm.js+4−5
tests/test-files/good-expected-js/CaseExpression3.elm.js+3−5
@@ -17,11 +17,9 @@ Elm.Main.make = function (_elm) {
1717 if (_p0._1.ctor === "Nil") {
1818 return Nil;
1919 } else {
20− var x = _p0._0._0,
21− xs = _p0._0._1,
22− y = _p0._1._0,
23− ys = _p0._1._1;
24− return A2(Cons,{ctor: "_Tuple2",_0: x,_1: y},A2(zip,xs,ys));
20+ return A2(Cons,
21+ {ctor: "_Tuple2",_0: _p0._0._0,_1: _p0._1._0},
22+ A2(zip,_p0._0._1,_p0._1._1));
2523 }
2624 }
2725 });
tests/test-files/good-expected-js/TailRecursive.elm.js+4−5
@@ -9,11 +9,10 @@ Elm.Main.make = function (_elm) {
99 any: while (true) {
1010 var _p0 = l;
1111 if (_p0.ctor === "::") {
12− var x = _p0._0,xs = _p0._1;
13− if (f(x)) return true; else {
14− var _v0 = f,_v1 = xs;
15− f = _v0;
16− l = _v1;
12+ if (f(_p0._0)) return true; else {
13+ var _v1 = f,_v2 = _p0._1;
14+ f = _v1;
15+ l = _v2;
1716 continue any;
1817 }
1918 } else {