This commit is contained in:
Mikhalkovich Stanislav 2019-06-21 21:41:45 +03:00
parent ac60dbde0f
commit cb8c3a0ef0
5 changed files with 23 additions and 8 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3"; public const string Major = "3";
public const string Minor = "5"; public const string Minor = "5";
public const string Build = "0"; public const string Build = "0";
public const string Revision = "2135"; public const string Revision = "2136";
public const string MainVersion = Major + "." + Minor; public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%MINOR%=5
%REVISION%=2135
%COREVERSION%=0 %COREVERSION%=0
%REVISION%=2136
%MINOR%=5
%MAJOR%=3 %MAJOR%=3

View file

@ -1 +1 @@
!define VERSION '3.5.0.2135' !define VERSION '3.5.0.2136'

14
TestSuite/v1eqv1.pas Normal file
View file

@ -0,0 +1,14 @@
begin
var v1 := 0;
var v2 := 0;
var p: procedure := ()->
begin
var v1 := v1+1; // Ошибка: Неизвестное имя 'v1'
v2 += 1; // если убрать эту строчку - ошибки нет
Assert(v1=1);
end;
p;
end.

View file

@ -71,6 +71,11 @@ namespace TreeConverter.LambdaExpressions.Closure
public override void visit(var_def_statement varDefStmt) public override void visit(var_def_statement varDefStmt)
{ {
if (varDefStmt.inital_value != null)
{
ProcessNode(varDefStmt.inital_value);
}
_visitor.visit(varDefStmt); _visitor.visit(varDefStmt);
foreach (var id in varDefStmt.vars.idents) foreach (var id in varDefStmt.vars.idents)
@ -79,10 +84,6 @@ namespace TreeConverter.LambdaExpressions.Closure
_currentTreeNode.VariablesDefinedInScope.Add(new CapturedVariablesTreeNode.CapturedSymbolInfo(varDefStmt, si)); _currentTreeNode.VariablesDefinedInScope.Add(new CapturedVariablesTreeNode.CapturedSymbolInfo(varDefStmt, si));
} }
if (varDefStmt.inital_value != null)
{
ProcessNode(varDefStmt.inital_value);
}
} }
public override void visit(statement_list stmtList) public override void visit(statement_list stmtList)