Skip to content

Commit 0dde294

Browse files
committed
add a crashed case
1 parent 01ab7eb commit 0dde294

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

jscomp/test/unboxed_crash.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
'use strict';
2+
3+
var Curry = require("../../lib/js/curry.js");
4+
5+
function g(x) {
6+
return Curry._1(x, x);
7+
}
8+
9+
var loop = g(g);
10+
11+
exports.g = g;
12+
exports.loop = loop;
13+
/* loop Not a pure module */

jscomp/test/unboxed_crash.ml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[@@@config
2+
{
3+
flags =
4+
[|
5+
"-w";
6+
"@A";
7+
"-drawlambda";
8+
(* "-dtypedtree"; *)
9+
"-bs-diagnose"
10+
(* "-dparsetree"; *)
11+
(* "-dsource"; *)
12+
(* "-bs-no-builtin-ppx"; *);
13+
|];
14+
}]
15+
16+
type t = A of (t -> int) [@@unboxed]
17+
18+
let g x = match x with A v -> v x
19+
20+
let loop = g (A g)

0 commit comments

Comments
 (0)