forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunified_ops_test.mjs
More file actions
105 lines (80 loc) · 1.14 KB
/
unified_ops_test.mjs
File metadata and controls
105 lines (80 loc) · 1.14 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// Generated by ReScript, PLEASE EDIT WITH CARE
let float = 1 + 2;
let string = "12";
let bigint = 1n + 2n;
function unknown(a, b) {
return a + b | 0;
}
function lhsint(a, b) {
return a + b | 0;
}
function lhsfloat(a, b) {
return a + b;
}
function lhsbigint(a, b) {
return a + b;
}
function lhsstring(a, b) {
return a + b;
}
function rhsint(a, b) {
return a + b | 0;
}
function rhsfloat(a, b) {
return a + b;
}
function rhsbigint(a, b) {
return a + b;
}
function rhsstring(a, b) {
return a + b;
}
function case1(a) {
return 1 + a | 0;
}
function case2(a, b) {
return a + "test" + b;
}
function even(n) {
return n % 2 === 0;
}
function odd(n) {
return n % 2 === 1;
}
let pow1 = 4;
let pow2 = 2 ** 2;
let pow3 = 2n ** 2n;
let pow_overflow = 0;
function bxor_int(a, b) {
return a ^ b;
}
function bxor_bigint(a, b) {
return a ^ b;
}
let int = 3;
export {
int,
float,
string,
bigint,
unknown,
lhsint,
lhsfloat,
lhsbigint,
lhsstring,
rhsint,
rhsfloat,
rhsbigint,
rhsstring,
case1,
case2,
even,
odd,
pow1,
pow2,
pow3,
pow_overflow,
bxor_int,
bxor_bigint,
}
/* No side effect */