Skip to content

Commit b562817

Browse files
committed
Add ppx error test
1 parent fd4fe29 commit b562817

File tree

2 files changed

+5
-45
lines changed

2 files changed

+5
-45
lines changed

tests/tools_tests/ppx/TestPpx.res

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@ module Arity = {
2424
let two = (x, y) => x + y
2525
let n = two(one(1), 5)
2626
}
27+
28+
@module("react")
29+
external useState: (unit => 'state) => string = "useState"
30+
31+
let _ = useState(() => 0)
Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +0,0 @@
1-
// Generated by ReScript, PLEASE EDIT WITH CARE
2-
'use strict';
3-
4-
5-
console.log("ppx test");
6-
7-
console.log("ppx test");
8-
9-
let M = {
10-
v: 10
11-
};
12-
13-
let OptionalFields = {
14-
r: {
15-
y: 1.0
16-
}
17-
};
18-
19-
function one(x) {
20-
return x;
21-
}
22-
23-
function two(x, y) {
24-
return x + y | 0;
25-
}
26-
27-
let Arity = {
28-
one: one,
29-
two: two,
30-
n: 6
31-
};
32-
33-
let a = "A";
34-
35-
let b = "B";
36-
37-
let vv = 10;
38-
39-
exports.a = a;
40-
exports.b = b;
41-
exports.M = M;
42-
exports.vv = vv;
43-
exports.OptionalFields = OptionalFields;
44-
exports.Arity = Arity;
45-
/* Not a pure module */

0 commit comments

Comments
 (0)