Skip to content

Commit db5e59e

Browse files
committed
Add signature help test: 2 type constraints
1 parent 9bea0e3 commit db5e59e

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
@@ -156,6 +156,17 @@ main =
156156
[ Nothing,
157157
Just $ SignatureHelp [SignatureInformation "pure :: forall (f :: Type -> Type) a. Applicative f => a -> f a" Nothing (Just [ParameterInformation (InR (55,56)) Nothing]) (Just (InL 0)), SignatureInformation "pure :: Bool -> IO Bool" Nothing (Just [ParameterInformation (InR (8,12)) Nothing]) (Just (InL 0)), SignatureInformation "pure :: forall a. a -> IO a" Nothing (Just [ParameterInformation (InR (18,19)) Nothing]) (Just (InL 0))] (Just 0) (Just (InL 0))
158158
],
159+
mkTest
160+
"2 type constraints"
161+
[trimming|
162+
f :: forall a. (Eq a, Num a) => a -> a -> a
163+
f = _
164+
x = f True
165+
^ ^
166+
|]
167+
[ Nothing,
168+
Just $ SignatureHelp [SignatureInformation "f :: forall a. (Eq a, Num a) => a -> a -> a" Nothing (Just [ParameterInformation (InR (32,33)) Nothing, ParameterInformation (InR (37,38)) Nothing]) (Just (InL 0)), SignatureInformation "f :: Bool -> Bool -> Bool" Nothing (Just [ParameterInformation (InR (5,9)) Nothing, ParameterInformation (InR (13,17)) Nothing]) (Just (InL 0))] (Just 0) (Just (InL 0))
169+
],
159170
mkTest
160171
"dynamic function"
161172
[trimming|

0 commit comments

Comments
 (0)