parent
acc6458a82
commit
cea1d58af6
9
TestSuite/lambdas22.pas
Normal file
9
TestSuite/lambdas22.pas
Normal 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
20
TestSuite/libs/l2.pas
Normal 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.
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue