fix #1893
This commit is contained in:
parent
8bdad9b717
commit
95a93215fb
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "5";
|
||||
public const string Build = "0";
|
||||
public const string Revision = "2151";
|
||||
public const string Revision = "2153";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=5
|
||||
%REVISION%=2151
|
||||
%REVISION%=2153
|
||||
%COREVERSION%=0
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.5.0.2151'
|
||||
!define VERSION '3.5.0.2153'
|
||||
|
|
|
|||
25
TestSuite/lambda_2_lambda.pas
Normal file
25
TestSuite/lambda_2_lambda.pas
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
type
|
||||
t1 = class
|
||||
pf: procedure;
|
||||
|
||||
procedure p1;
|
||||
begin
|
||||
var obj: byte;
|
||||
|
||||
var lp2: procedure := ()->
|
||||
begin
|
||||
obj := obj;
|
||||
pf := ()->
|
||||
begin
|
||||
Print(1);
|
||||
end;
|
||||
pf;
|
||||
end;
|
||||
lp2;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
begin
|
||||
t1.Create.p1;
|
||||
end.
|
||||
|
|
@ -248,10 +248,10 @@ namespace TreeConverter.LambdaExpressions.Closure
|
|||
}
|
||||
if (ok)
|
||||
{
|
||||
if (id.Parent is var_def_statement)
|
||||
ProcessNode(dn); // SSM 26.06.19 #1893
|
||||
/*if (id.Parent is var_def_statement)
|
||||
ProcessNode(dn); // Грубая правка, закрывающая ошибку #1390 // SSM 19.06.19 заменил id на dn
|
||||
else ProcessNode(id.Parent); // Грубо, поскольку id.Parent уже начал обходиться - а здесь рекурсия
|
||||
// Это рубится на коде var s := c; где s - локальная в лямбде, а c - захваченное поле класса. В результате s создаётся дважды.
|
||||
else ProcessNode(dn); // Грубо, поскольку id.Parent уже начал обходиться - а здесь рекурсия // Это рубится на коде var s := c; где s - локальная в лямбде, а c - захваченное поле класса. В результате s создаётся дважды.*/
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue