Add test for unifying inferred a with annotated Int
The last commit showed that an annotated number caused a regression.
This commit shows that a concrete annotated type like Int is fine.
Add the expected compiled JS for both tests.
commitfa5b6ff99509fe857dbf5113ac259f2b15f73604
authorMax Goldstein <maxgoldstein1@gmail.com>
dateWed 11 Nov 2015, 11:28 (11 years ago)
parentefb86bc
tests/test-files/good-expected-js/Soundness/SpecificAnnotationInt.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 px = function (x) { return "test";};
9+ return _elm.Main.values = {_op: _op,px: px};
10+};
tests/test-files/good-expected-js/Soundness/SpecificAnnotationNumber.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 px = function (x) { return "test";};
9+ return _elm.Main.values = {_op: _op,px: px};
10+};
tests/test-files/good/Soundness/SpecificAnnotationInt.elmnew file+2
@@ -0,0 +1,2 @@
1+px : Int -> String
2+px x = "test"