bug fix #1997
This commit is contained in:
parent
fe54b731c8
commit
4638361fab
|
|
@ -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 = "2117";
|
||||
public const string Revision = "2118";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=5
|
||||
%REVISION%=2117
|
||||
%COREVERSION%=0
|
||||
%REVISION%=2118
|
||||
%MINOR%=5
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.5.0.2117'
|
||||
!define VERSION '3.5.0.2118'
|
||||
|
|
|
|||
17
TestSuite/Lambda_two_variables_capture.pas
Normal file
17
TestSuite/Lambda_two_variables_capture.pas
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
type
|
||||
t1 = class
|
||||
public
|
||||
f: integer;
|
||||
procedure p1;
|
||||
begin
|
||||
var v := 2;
|
||||
var p: procedure := ()->
|
||||
begin
|
||||
var nv := v;
|
||||
var nf := f;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
|
|
@ -237,7 +237,7 @@ namespace TreeConverter.LambdaExpressions.Closure
|
|||
if (ok)
|
||||
{
|
||||
if (id.Parent is var_def_statement)
|
||||
ProcessNode(id); // Грубая правка, закрывающая ошибку #1390
|
||||
ProcessNode(dn); // Грубая правка, закрывающая ошибку #1390 // SSM 19.06.19 заменил id на dn
|
||||
else ProcessNode(id.Parent); // Грубо, поскольку id.Parent уже начал обходиться - а здесь рекурсия
|
||||
// Это рубится на коде var s := c; где s - локальная в лямбде, а c - захваченное поле класса. В результате s создаётся дважды.
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -407,6 +407,9 @@ namespace PascalABCCompiler.TreeConverter
|
|||
exprList.Add(value.from);
|
||||
}
|
||||
}
|
||||
/*public override void visit(function_lambda_definition fld)
|
||||
{
|
||||
}*/
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue