Skip to content

Commit 4974b5e

Browse files
committedMay 21, 2023
add failing test for completing uncurried function templates
1 parent 9b5673b commit 4974b5e

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed
 

‎analysis/tests/src/Completion.res

+7
Original file line numberDiff line numberDiff line change
@@ -454,4 +454,11 @@ type someVariantWithDeprecated =
454454
let uncurried = (. num) => num + 2
455455

456456
// let _ = uncurried(. 1)->toS
457+
// ^com
458+
459+
type withUncurried = {
460+
fn: (. int) => unit
461+
}
462+
463+
// let f: withUncurried = {fn: }
457464
// ^com

‎analysis/tests/src/expected/Completion.res.txt

+12-2
Original file line numberDiff line numberDiff line change
@@ -1944,8 +1944,8 @@ Path red
19441944
}]
19451945

19461946
Complete src/Completion.res 405:22
1947-
posCursor:[405:22] posNoWhite:[405:21] Found expr:[405:11->457:0]
1948-
Pexp_apply ...__ghost__[0:-1->0:-1] (...[405:11->423:17], ...[428:0->457:0])
1947+
posCursor:[405:22] posNoWhite:[405:21] Found expr:[405:11->464:0]
1948+
Pexp_apply ...__ghost__[0:-1->0:-1] (...[405:11->423:17], ...[428:0->464:0])
19491949
posCursor:[405:22] posNoWhite:[405:21] Found expr:[405:11->423:17]
19501950
Pexp_apply ...__ghost__[0:-1->0:-1] (...[405:11->405:19], ...[405:21->423:17])
19511951
posCursor:[405:22] posNoWhite:[405:21] Found expr:[405:21->423:17]
@@ -2181,3 +2181,13 @@ Path Belt.Int.toS
21812181
"documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"}
21822182
}]
21832183

2184+
Complete src/Completion.res 462:30
2185+
XXX Not found!
2186+
Completable: Cexpression Type[withUncurried]->recordField(fn)
2187+
Raw opens: 2 Shadow.B.place holder ... Shadow.A.place holder
2188+
Package opens Pervasives.JsxModules.place holder
2189+
Resolved opens 3 Completion.res Completion.res pervasives
2190+
ContextPath Type[withUncurried]
2191+
Path withUncurried
2192+
[]
2193+

0 commit comments

Comments
 (0)
Please sign in to comment.