File tree Expand file tree Collapse file tree 1 file changed +25
-11
lines changed
apps/language_server/test/providers/signature_help Expand file tree Collapse file tree 1 file changed +25
-11
lines changed Original file line number Diff line number Diff line change @@ -1305,17 +1305,31 @@ defmodule ElixirLS.LanguageServer.Providers.SignatureHelp.SignatureTest do
1305
1305
1306
1306
res = Signature . signature ( code , 7 , 21 )
1307
1307
1308
- assert % {
1309
- active_param: 0 ,
1310
- signatures: [
1311
- % {
1312
- documentation: "A function available in all protocol definitions" <> _ ,
1313
- name: "impl_for" ,
1314
- params: [ "data" ] ,
1315
- spec: "@callback impl_for(term()) :: module() | nil"
1316
- }
1317
- ]
1318
- } = res
1308
+ if Version . match? ( System . version ( ) , ">= 1.18.0" ) do
1309
+ assert % {
1310
+ active_param: 0 ,
1311
+ signatures: [
1312
+ % {
1313
+ documentation: "A function available in all protocol definitions" <> _ ,
1314
+ name: "impl_for" ,
1315
+ params: [ "data" ] ,
1316
+ spec: "@callback impl_for(term()) :: module() | nil"
1317
+ }
1318
+ ]
1319
+ } = res
1320
+ else
1321
+ assert % {
1322
+ active_param: 0 ,
1323
+ signatures: [
1324
+ % {
1325
+ documentation: "Returns the module" <> _ ,
1326
+ name: "impl_for" ,
1327
+ params: [ "data" ] ,
1328
+ spec: "@spec impl_for(term()) :: atom | nil"
1329
+ }
1330
+ ]
1331
+ } = res
1332
+ end
1319
1333
end
1320
1334
1321
1335
test "retrieve metadata macro signature - fallback to macrocallback" do
You can’t perform that action at this time.
0 commit comments