This commit is contained in:
Mikhalkovich Stanislav 2019-04-01 07:25:01 +03:00
parent 606ddbc620
commit 632c42ca10
4 changed files with 21 additions and 0 deletions

View file

@ -1836,5 +1836,10 @@ namespace PascalABCCompiler.SyntaxTree
}
}
public partial class semantic_check_sugared_statement_node
{
public bool visited = false;
}
}

View file

@ -0,0 +1,3 @@
begin
Writeln(1 mod 0);
end.

10
TestSuite/loopn.pas Normal file
View file

@ -0,0 +1,10 @@
begin
var n := 10;
loop n do
Print(1);
var p: procedure;
p := ()->begin
Print(n);
end;
Assert(1=1);
end.

View file

@ -20111,6 +20111,9 @@ namespace PascalABCCompiler.TreeConverter
public override void visit(SyntaxTree.semantic_check_sugared_statement_node st)
{
if (st.visited)
return;
st.visited = true;
if (st.typ as System.Type == typeof(SyntaxTree.assign_tuple))
{
var vars = st.lst[0] as SyntaxTree.addressed_value_list;