Skip to content

Commit aef9296

Browse files
committed
Add an edge test case
1 parent a24d17e commit aef9296

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

jscomp/test/build.ninja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ build test/record_debug_test.cmi test/record_debug_test.cmj : cc test/record_deb
479479
build test/record_with_test.cmi test/record_with_test.cmj : cc test/record_with_test.ml | test/mt.cmj $stdlib
480480
build test/recursive_module.cmi test/recursive_module.cmj : cc test/recursive_module.ml | test/mt.cmj $stdlib
481481
build test/recursive_module_test.cmi test/recursive_module_test.cmj : cc test/recursive_module_test.ml | test/mt.cmj $stdlib
482+
build test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj : cc test/recursive_unbound_module_test.ml | $stdlib
482483
build test/regression_print.cmi test/regression_print.cmj : cc test/regression_print.ml | $stdlib
483484
build test/relative_path.cmi test/relative_path.cmj : cc test/relative_path.ml | $stdlib
484485
build test/return_check.cmi test/return_check.cmj : cc test/return_check.ml | $stdlib
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
'use strict';
2+
3+
var Caml_module = require("../../lib/js/caml_module.js");
4+
5+
function Make(X) {
6+
var f = function (param) {
7+
return /* () */0;
8+
};
9+
var M = /* module */[/* f */f];
10+
return /* module */[/* M */M];
11+
}
12+
13+
var B = Caml_module.init_mod([
14+
"recursive_unbound_module_test.ml",
15+
15,
16+
0
17+
], [[[[0]]]]);
18+
19+
function f(param) {
20+
return /* () */0;
21+
}
22+
23+
var M = /* module */[/* f */f];
24+
25+
Caml_module.update_mod([[[[0]]]], B, /* module */[/* M */M]);
26+
27+
var A = /* () */0;
28+
29+
exports.Make = Make;
30+
exports.A = A;
31+
exports.B = B;
32+
/* B Not a pure module */
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
3+
4+
module type S =
5+
sig
6+
module M : sig val f : unit -> unit end
7+
end
8+
9+
module Make (X : sig end) =
10+
struct
11+
module M = struct let f () = () end
12+
end
13+
14+
module rec A : sig end =
15+
struct
16+
end
17+
and B : S =
18+
struct
19+
module C = Make(A)
20+
include C
21+
end

0 commit comments

Comments
 (0)