forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs_obj_test.js
75 lines (67 loc) · 1.55 KB
/
js_obj_test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// Generated CODE, PLEASE EDIT WITH CARE
'use strict';
var Mt = require("./mt");
var CamlinternalOO = require("../stdlib/camlinternalOO");
var Caml_curry = require("../runtime/caml_curry");
function f(u) {
if (u.tag === 248) {
return Caml_curry.js2(5740587, 1, u, 32);
}
else {
return Caml_curry.app1(u.say.bind(u), 32);
}
}
var class_tables = [
0,
0,
0
];
var suites_000 = /* tuple */[
"caml_obj",
function () {
if (!class_tables[0]) {
var $$class = CamlinternalOO.create_table(["say"]);
var say = CamlinternalOO.get_method_label($$class, "say");
CamlinternalOO.set_method($$class, say, function (_, x) {
return 1 + x | 0;
});
var env_init = function () {
return CamlinternalOO.create_object_opt(0, $$class);
};
CamlinternalOO.init_class($$class);
class_tables[0] = env_init;
}
return /* Eq */{
0: 33,
1: f(Caml_curry.app1(class_tables[0], 0)),
length: 2,
tag: 0
};
}
];
var suites_001 = /* :: */[
/* tuple */[
"js_obj",
function () {
return /* Eq */{
0: 34,
1: f({
"say": function (x) {
return x + 2 | 0;
}
}),
length: 2,
tag: 0
};
}
],
/* [] */0
];
var suites = /* :: */[
suites_000,
suites_001
];
Mt.from_pair_suites("js_obj_test.ml", suites);
exports.f = f;
exports.suites = suites;
/* Not a pure module */