bug fix #1531
This commit is contained in:
parent
aa3242524a
commit
673f9bc149
|
|
@ -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 = "2114";
|
||||
public const string Revision = "2117";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%COREVERSION%=0
|
||||
%REVISION%=2114
|
||||
%MINOR%=5
|
||||
%REVISION%=2117
|
||||
%COREVERSION%=0
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.5.0.2114'
|
||||
!define VERSION '3.5.0.2117'
|
||||
|
|
|
|||
14
TestSuite/lambda_capture_for_counter_1.pas
Normal file
14
TestSuite/lambda_capture_for_counter_1.pas
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
begin
|
||||
Arr(0).Select(
|
||||
i ->
|
||||
begin
|
||||
Result := 0;
|
||||
for var i2 := 3 to 4 do
|
||||
begin
|
||||
//Print(i2);
|
||||
var a := i2;
|
||||
Print(a)
|
||||
end;
|
||||
end
|
||||
);
|
||||
end.
|
||||
12
TestSuite/lambda_capture_foreach_counter_1.pas
Normal file
12
TestSuite/lambda_capture_foreach_counter_1.pas
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
begin
|
||||
Arr(0).Select(
|
||||
i->
|
||||
begin
|
||||
Result := 0;
|
||||
foreach var i2 in Arr(1,2) do
|
||||
begin
|
||||
var a := i2;
|
||||
end;
|
||||
end
|
||||
);
|
||||
end.
|
||||
|
|
@ -69,6 +69,16 @@ namespace TreeConverter.LambdaExpressions
|
|||
syntaxTreeVisitor.visit(varStmt);
|
||||
}
|
||||
|
||||
public override void visit(PascalABCCompiler.SyntaxTree.for_node fn)
|
||||
{
|
||||
syntaxTreeVisitor.visit(fn);
|
||||
}
|
||||
|
||||
public override void visit(PascalABCCompiler.SyntaxTree.foreach_stmt fn)
|
||||
{
|
||||
syntaxTreeVisitor.visit(fn);
|
||||
}
|
||||
|
||||
// Patterns
|
||||
public override void visit(desugared_deconstruction _desugared_deconstruction)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19438,7 +19438,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
{
|
||||
visit(procDecl);
|
||||
}
|
||||
catch
|
||||
catch (Exception e)
|
||||
{
|
||||
context.remove_lambda_function(procDecl.proc_header.name.meth_name.name, true);
|
||||
throw;
|
||||
|
|
|
|||
Loading…
Reference in a new issue