Skip to content

Commit ed846aa

Browse files
committed
Add ppx test for "->" representation.
1 parent 2dc9037 commit ed846aa

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

tests/tools_tests/ppx/TestPpx.res

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,8 @@ let async_foo = async (x, y) => {
4545

4646
let add = (x, y) => x + y
4747
let partial_add = add(3, ...)
48+
49+
module Pipe = {
50+
let plus = (x, y) => x + y
51+
let z = 1->plus(2)
52+
}

tests/tools_tests/src/expected/TestPpx.res.jsout

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@ function partial_add(extra) {
5959
return 3 + extra | 0;
6060
}
6161

62+
function plus(x, y) {
63+
return x + y | 0;
64+
}
65+
66+
let z = 3;
67+
68+
let Pipe = {
69+
plus: plus,
70+
z: z
71+
};
72+
6273
let a = "A";
6374

6475
let b = "B";
@@ -77,4 +88,5 @@ exports.async_succ = async_succ;
7788
exports.async_foo = async_foo;
7889
exports.add = add;
7990
exports.partial_add = partial_add;
91+
exports.Pipe = Pipe;
8092
/* Not a pure module */

0 commit comments

Comments
 (0)