This commit is contained in:
Ivan Bondarev 2024-03-31 10:31:22 +02:00
parent c6929c5d55
commit 1609eddc9d
2 changed files with 22 additions and 0 deletions

13
TestSuite/generics77.pas Normal file
View file

@ -0,0 +1,13 @@
var i: integer := 0;
// Вместо IntRange - любой тип НЕ из .dll
// Обязательно params
procedure p1(params a: array of IntRange);
begin
i := a[0].High;
end;
begin
p1(Lst&<IntRange>(1..3).ToArray);
assert(i = 3);
end.

View file

@ -10249,6 +10249,15 @@ namespace PascalABCCompiler.TreeConverter
mc.visit(this);
return;
}
if (sil != null && sil.Count > 1)
{
List<SymbolInfo> no_extmeth_sil = new List<SymbolInfo>();
foreach (var si in sil)
if (si.sym_info is function_node && !(si.sym_info as function_node).is_extension_method)
no_extmeth_sil.Add(si);
if (no_extmeth_sil.Count > 0)
sil = no_extmeth_sil;
}
return_value(expression_value_reciving(id_right, sil, en, true));
return;
}