Skip to content

Commit 532747e

Browse files
committed
dont use deprecated functions
1 parent f6c9e1c commit 532747e

File tree

5 files changed

+154
-153
lines changed

5 files changed

+154
-153
lines changed

analysis/tests/src/CodeLens.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
let add = (x, y) => x + y
22

3-
let foo = (~age, ~name) => name ++ string_of_int(age)
3+
let foo = (~age, ~name) => name ++ Int.toString(age)
44

55
let ff = (~opt1=0, ~a, ~b, (), ~opt2=0, (), ~c) => a + b + c + opt1 + opt2
66

analysis/tests/src/Completion.res

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module Dep: {
1717
// ^com
1818

1919
module Lib = {
20-
let foo = (~age, ~name) => name ++ string_of_int(age)
20+
let foo = (~age, ~name) => name ++ Int.toString(age)
2121
let next = (~number=0, ~year) => number + year
2222
}
2323

@@ -51,7 +51,7 @@ let fa: ForAuto.t = 34
5151
module O = {
5252
module Comp = {
5353
@react.component
54-
let make = (~first="", ~zoo=3, ~second) => React.string(first ++ second ++ string_of_int(zoo))
54+
let make = (~first="", ~zoo=3, ~second) => React.string(first ++ second ++ Int.toString(zoo))
5555
}
5656
}
5757

@@ -96,18 +96,18 @@ let nestedObj = {"x": {"y": {"name": "a", "age": 32}}}
9696
// nestedObj["x"]["y"]["
9797
// ^com
9898

99-
let o: Objects.objT = assert false
99+
let o: Objects.objT = assert(false)
100100
// o["a
101101
// ^com
102102

103103
type nestedObjT = {"x": Objects.nestedObjT}
104-
let no: nestedObjT = assert false
104+
let no: nestedObjT = assert(false)
105105
// no["x"]["y"]["
106106
// ^com
107107

108108
type r = {x: int, y: string}
109109
type rAlias = r
110-
let r: rAlias = assert false
110+
let r: rAlias = assert(false)
111111
// r.
112112
// ^com
113113

@@ -136,7 +136,7 @@ let foo = {
136136
| 3 => a + b
137137
| _ => 42
138138
}
139-
let z = assert false
139+
let z = assert(false)
140140
let _ = z
141141
module Inner = {
142142
type z = int
@@ -154,7 +154,7 @@ exception MyOtherException
154154

155155
type aa = {x: int, name: string}
156156
type bb = {aa: aa, w: int}
157-
let q: bb = assert false
157+
let q: bb = assert(false)
158158
// q.aa.
159159
// ^com
160160
// q.aa.n
@@ -212,7 +212,7 @@ let _ = shadowed
212212

213213
module FAR = {
214214
type forAutoRecord = {forAuto: ForAuto.t, something: option<int>}
215-
let forAutoRecord: forAutoRecord = assert false
215+
let forAutoRecord: forAutoRecord = assert(false)
216216
}
217217

218218
module FAO = {
@@ -287,7 +287,7 @@ type funRecord = {
287287
stuff: string,
288288
}
289289

290-
let funRecord: funRecord = assert false
290+
let funRecord: funRecord = assert(false)
291291

292292
// let _ = funRecord.someFun(~ )
293293
// ^com
@@ -319,7 +319,10 @@ let ff = (~opt1=0, ~a, ~b, (), ~opt2=0, (), ~c) => a + b + c + opt1 + opt2
319319

320320
type callback = (~a: int) => int
321321

322-
let withCallback: (~b: int) => callback = (~b) => { (); (~a) => a + b }
322+
let withCallback: (~b: int) => callback = (~b) => {
323+
()
324+
(~a) => a + b
325+
}
323326

324327
// withCallback(~
325328
// ^com
@@ -451,17 +454,15 @@ type someVariantWithDeprecated =
451454
// let v: someVariantWithDeprecated =
452455
// ^com
453456

454-
let uncurried = (. num) => num + 2
457+
let uncurried = num => num + 2
455458

456459
// let _ = uncurried(. 1)->toS
457460
// ^com
458461

459-
type withUncurried = {
460-
fn: (. int) => unit
461-
}
462+
type withUncurried = {fn: int => unit}
462463

463464
// let f: withUncurried = {fn: }
464465
// ^com
465466

466467
// let someRecord = { FAR. }
467-
// ^com
468+
// ^com

analysis/tests/src/DocumentSymbol.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Dep: {
88
}
99

1010
module Lib = {
11-
let foo = (~age, ~name) => name ++ string_of_int(age)
11+
let foo = (~age, ~name) => name ++ Int.toString(age)
1212
let next = (~number=0, ~year) => number + year
1313
}
1414

@@ -25,7 +25,7 @@ let fa: ForAuto.t = 34
2525
module O = {
2626
module Comp = {
2727
@react.component
28-
let make = (~first="", ~zoo=3, ~second) => React.string(first ++ second ++ string_of_int(zoo))
28+
let make = (~first="", ~zoo=3, ~second) => React.string(first ++ second ++ Int.toString(zoo))
2929
}
3030
}
3131

0 commit comments

Comments
 (0)