l2.dll sources
This commit is contained in:
Ivan Bondarev 2024-01-14 12:28:36 +01:00
parent acc6458a82
commit cea1d58af6
3 changed files with 31 additions and 0 deletions

9
TestSuite/lambdas22.pas Normal file
View file

@ -0,0 +1,9 @@
begin
var i := 0;
var p: Action0 := ()->begin i := 1 end;
var l := Lst&<Action0>();
l.Add(()->begin i := 2 end);
var l2 := l.ConvertAll(a->p);
l2[0]();
assert(i = 1);
end.

20
TestSuite/libs/l2.pas Normal file
View file

@ -0,0 +1,20 @@
library l2;
type
t1 = class
public function m1 := 0;
end;
t2 = class(t1)
public static i: integer;
public static procedure m1;
begin
i := 1;
end;
end;
end.

View file

@ -589,6 +589,8 @@ namespace PascalABCCompiler.TreeRealization
private static bool CheckIfTypeDependsOnUndeducedGenericParameters(type_node formalType, type_node[] deduced) //lroman
{
if (formalType == null)
return false;
if (formalType.generic_function_container != null)
{
var par_num = formalType.generic_param_index;