Merge branch 'pr/1125' into pr/1126
commit83317c828840f433595b33cef7e1c2346d1784cd
authorEvan Czaplicki <info@elm-lang.org>
dateTue 27 Oct 2015, 20:45 (11 years ago)
parentd7c2354bbf5471
tests/test-files/good-expected-js/CodeGenBugs/CommentInterpretedAsInfix.elm.jsnew file+14
@@ -0,0 +1,14 @@
1+Elm.Main = Elm.Main || {};
2+Elm.Main.make = function (_elm) {
3+ "use strict";
4+ _elm.Main = _elm.Main || {};
5+ if (_elm.Main.values) return _elm.Main.values;
6+ var _U = Elm.Native.Utils.make(_elm);
7+ var _op = {};
8+ var always = F2(function (x,s) { return x;});
9+ _op["|>"] = F2(function (a,f) { return f(a);});
10+ var value = A2(_op["|>"],"Hi",always("Hello"));
11+ return _elm.Main.values = {_op: _op
12+ ,always: always
13+ ,value: value};
14+};
tests/test-files/good-expected-js/CodeGenBugs/NestedPatternMatch.elm.jsnew file+10
@@ -0,0 +1,10 @@
1+Elm.Main = Elm.Main || {};
2+Elm.Main.make = function (_elm) {
3+ "use strict";
4+ _elm.Main = _elm.Main || {};
5+ if (_elm.Main.values) return _elm.Main.values;
6+ var _U = Elm.Native.Utils.make(_elm);
7+ var _op = {};
8+ var foo = function (_p0) { var _p1 = _p0;return _p1;};
9+ return _elm.Main.values = {_op: _op,foo: foo};
10+};
tests/test-files/good/CodeGenBugs/CommentInterpretedAsInfix.elmnew file+12
@@ -0,0 +1,12 @@
1+
2+-- Issue: https://github.com/elm-lang/elm-compiler/issues/894
3+-- Two dashes immediately follow by other symbols are incorrectly
4+-- interpreted as an infix operator, instead of a comment.
5+
6+(|>) a f = f a
7+
8+always x s = x
9+
10+value = "Hi"
11+ |> always "Hello"
12+ --|> always "Bye"
tests/test-files/good/CodeGenBugs/NestedPatternMatch.elmnew file+5
@@ -0,0 +1,5 @@
1+
2+-- Issue: https://github.com/elm-lang/elm-compiler/issues/1115
3+-- Nested patterns are not correctly handled and fail with unreachable assertion error.
4+
5+foo (({f1} as r1) as r2) = r1