fix #1897
This commit is contained in:
parent
606ddbc620
commit
632c42ca10
|
|
@ -1836,5 +1836,10 @@ namespace PascalABCCompiler.SyntaxTree
|
|||
}
|
||||
}
|
||||
|
||||
public partial class semantic_check_sugared_statement_node
|
||||
{
|
||||
public bool visited = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
3
TestSuite/errors/err0317.pas
Normal file
3
TestSuite/errors/err0317.pas
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
begin
|
||||
Writeln(1 mod 0);
|
||||
end.
|
||||
10
TestSuite/loopn.pas
Normal file
10
TestSuite/loopn.pas
Normal 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.
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue