Skip to content

Commit 471958f

Browse files
committed
Add a signature help test for higher-order function
1 parent dca1311 commit 471958f

File tree

1 file changed

+11
-0
lines changed
  • plugins/hls-signature-help-plugin/test

1 file changed

+11
-0
lines changed

plugins/hls-signature-help-plugin/test/Main.hs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,17 @@ main =
123123
Just $ SignatureHelp [SignatureInformation "f :: Int -> Int -> Int" Nothing (Just [ParameterInformation (InR (5,8)) Nothing, ParameterInformation (InR (12,15)) Nothing]) (Just (InL 0))] (Just 0) (Just (InL 0)),
124124
Just $ SignatureHelp [SignatureInformation "f :: Int -> Int -> Int" Nothing (Just [ParameterInformation (InR (5,8)) Nothing, ParameterInformation (InR (12,15)) Nothing]) (Just (InL 1))] (Just 0) (Just (InL 1))
125125
],
126+
mkTest
127+
"higher-order function"
128+
[trimming|
129+
f :: (Int -> Int) -> Int -> Int
130+
f = _
131+
x = f (+ 1) 2
132+
^ ^
133+
|]
134+
[ Nothing,
135+
Just $ SignatureHelp [SignatureInformation "f :: (Int -> Int) -> Int -> Int" Nothing (Just [ParameterInformation (InR (5,17)) Nothing, ParameterInformation (InR (21,24)) Nothing]) (Just (InL 0))] (Just 0) (Just (InL 0))
136+
],
126137
mkTest
127138
"type constraint"
128139
[trimming|

0 commit comments

Comments
 (0)