Skip to content
Snippets Groups Projects
Commit 4897bebf authored by local user's avatar local user
Browse files

func scope check fixes

parent e52c905a
Branches func master
No related merge requests found
Pipeline #5796 passed with warnings with stages
in 6 minutes and 48 seconds
......@@ -59,6 +59,7 @@ namespace SimpleLang.Visitors
public override void VisitFuncCallNode(FuncCallNode fcn)
{
fcn.Params?.Visit(this);
}
}
}
......@@ -100,7 +100,7 @@ namespace TestCodeGenerator
[Test]
public void TestFunc()
{
Assert.AreEqual("-4", TestHelper.GenerateNRun(@"
Assert.AreEqual("-1", TestHelper.GenerateNRun(@"
function f(a,b,c)
function m(x)
......@@ -117,7 +117,7 @@ namespace TestCodeGenerator
end
begin
var a,b,c; a := 1; b := 2; c := 3;
var a,b,c; a := 2; b := 2; c := 3;
write(f(a,b,c));
end
"));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment