Skip to content

Commit cae92f1

Browse files
committed
Add test for pipe operator
1 parent 6e188ff commit cae92f1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

compiler/test/suites/functions.re

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,15 @@ truc()|},
504504
|},
505505
"0\n1\n2\n3\n",
506506
);
507+
assertRun(
508+
"partial13",
509+
{|
510+
let (|>) = (x, f) => f(x)
511+
let add = (x, y) => x + y
512+
print(1 |> partial add(2, _) |> partial add(3, _))
513+
|},
514+
"6\n",
515+
);
507516

508517
assertCompileError(
509518
"partial_err1",

0 commit comments

Comments
 (0)