on master help sign in
Add good compiler test for issue #1115.
351ac4dLaszlo Pandy
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/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