Skip to content

Commit e84422c

Browse files
committed
add failing completion test where uncurried functions are not taken into consideration
1 parent 3005e56 commit e84422c

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

analysis/tests/src/Completion.res

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,3 +450,8 @@ type someVariantWithDeprecated =
450450
// Should show deprecated status
451451
// let v: someVariantWithDeprecated =
452452
// ^com
453+
454+
let uncurried = (. num) => num + 2
455+
456+
// let _ = uncurried(. 1)->
457+
// ^com

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

Lines changed: 14 additions & 2 deletions
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->453:0]
1948-
Pexp_apply ...__ghost__[0:-1->0:-1] (...[405:11->423:17], ...[428:0->453:0])
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])
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]
@@ -2161,3 +2161,15 @@ Path someVariantWithDeprecated
21612161
"insertTextFormat": 2
21622162
}]
21632163

2164+
Complete src/Completion.res 455:27
2165+
posCursor:[455:27] posNoWhite:[455:26] Found expr:[455:11->0:-1]
2166+
Completable: Cpath Value[uncurried](Nolabel)->
2167+
Raw opens: 2 Shadow.B.place holder ... Shadow.A.place holder
2168+
Package opens Pervasives.JsxModules.place holder
2169+
Resolved opens 3 Completion.res Completion.res pervasives
2170+
ContextPath Value[uncurried](Nolabel)->
2171+
ContextPath Value[uncurried](Nolabel)
2172+
ContextPath Value[uncurried]
2173+
Path uncurried
2174+
[]
2175+

0 commit comments

Comments
 (0)