Skip to content

Commit 1f2349d

Browse files
committed
Analysis tests: replace "|>" with "->"
1 parent 8e78be9 commit 1f2349d

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@
12161216
addValueReference OptArg.res:14:4 --> OptArg.res:14:21
12171217
addValueReference OptArg.res:14:4 --> OptArg.res:14:27
12181218
DeadOptionalArgs.addReferences twoArgs called with optional argNames: argNamesMaybe: OptArg.res:16:7
1219-
addValueReference OptArg.res:16:12 --> OptArg.res:14:4
1219+
addValueReference OptArg.res:16:10 --> OptArg.res:14:4
12201220
addValueReference OptArg.res:18:4 --> OptArg.res:18:17
12211221
addValueReference OptArg.res:18:4 --> OptArg.res:18:14
12221222
addValueReference OptArg.res:18:4 --> OptArg.res:18:24
@@ -2510,7 +2510,7 @@ File References
25102510
Live Value +OptArg.+fourArgs: 1 references (OptArg.res:26:4) [0]
25112511
Live Value +OptArg.+wrapOneArg: 1 references (OptArg.res:22:7) [0]
25122512
Live Value +OptArg.+oneArg: 1 references (OptArg.res:20:4) [0]
2513-
Live Value +OptArg.+twoArgs: 1 references (OptArg.res:16:12) [0]
2513+
Live Value +OptArg.+twoArgs: 1 references (OptArg.res:16:10) [0]
25142514
Live Value +OptArg.+threeArgs: 2 references (OptArg.res:11:7, OptArg.res:12:7) [0]
25152515
Live Value +OptArg.+bar: 2 references (OptArg.res:7:7, OptArg.resi:2:0) [0]
25162516
Live Value +OptArg.+foo: 1 references (OptArg.res:5:7) [0]

tests/analysis_tests/tests-reanalyze/deadcode/src/OptArg.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Js.log(threeArgs(~a=4, 1))
1313

1414
let twoArgs = (~a=1, ~b=2, c) => a + b + c
1515

16-
Js.log(1 |> twoArgs)
16+
Js.log(1->twoArgs)
1717

1818
let oneArg = (~a=1, ~z, b) => a + b
1919

tests/analysis_tests/tests-reanalyze/deadcode/src/Uncurried.res

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ type u3 = (. int, string, int) => string
1414
let uncurried0 = (. ()) => ""
1515

1616
@genType
17-
let uncurried1 = (. x) => x |> string_of_int
17+
let uncurried1 = (. x) => x -> string_of_int
1818

1919
@genType
20-
let uncurried2 = (. x, y) => (x |> string_of_int) ++ y
20+
let uncurried2 = (. x, y) => (x -> string_of_int) ++ y
2121

2222
@genType
23-
let uncurried3 = (. x, y, z) => (x |> string_of_int) ++ (y ++ (z |> string_of_int))
23+
let uncurried3 = (. x, y, z) => (x -> string_of_int) ++ (y ++ (z -> string_of_int))
2424

2525
@genType
26-
let curried3 = (x, y, z) => (x |> string_of_int) ++ (y ++ (z |> string_of_int))
26+
let curried3 = (x, y, z) => (x -> string_of_int) ++ (y ++ (z -> string_of_int))
2727

2828
@genType
29-
let callback = cb => cb() |> string_of_int
29+
let callback = cb => cb() -> string_of_int
3030

3131
type auth = {login: unit => string}
3232
type authU = {loginU: (. unit) => string}

tests/analysis_tests/tests-reanalyze/deadcode/src/Unison.res

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ let rec toString = (~width, stack) =>
2727
switch stack {
2828
| Cons({break, doc}, stack) =>
2929
switch break {
30-
| IfNeed => (fits(width, stack) ? "fits " : "no ") ++ (stack |> toString(~width=width - 1))
31-
| Never => "never " ++ (doc ++ (stack |> toString(~width=width - 1)))
32-
| Always => "always " ++ (doc ++ (stack |> toString(~width=width - 1)))
30+
| IfNeed => (fits(width, stack) ? "fits " : "no ") ++ (stack -> toString(~width=width - 1))
31+
| Never => "never " ++ (doc ++ (stack -> toString(~width=width - 1)))
32+
| Always => "always " ++ (doc ++ (stack -> toString(~width=width - 1)))
3333
}
3434
| Empty => ""
3535
}

tests/analysis_tests/tests-reanalyze/deadcode/src/exception/TestYojson.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ let foo = x => Yojson.Basic.from_string(x)
44
let bar = (str, json) =>
55
switch {
66
open Yojson.Basic.Util
7-
json |> member(str)
7+
member(str, json)
88
} {
99
| j => j
1010
| exception Yojson.Basic.Util.Type_error("a", d) when d == json => json

0 commit comments

Comments
 (0)