This commit is contained in:
parent
c6929c5d55
commit
1609eddc9d
13
TestSuite/generics77.pas
Normal file
13
TestSuite/generics77.pas
Normal 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.
|
||||||
|
|
@ -10249,6 +10249,15 @@ namespace PascalABCCompiler.TreeConverter
|
||||||
mc.visit(this);
|
mc.visit(this);
|
||||||
return;
|
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_value(expression_value_reciving(id_right, sil, en, true));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue