Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on nested function program. #10

Open
nikitas-theo opened this issue May 13, 2021 · 0 comments
Open

Error on nested function program. #10

nikitas-theo opened this issue May 13, 2021 · 0 comments

Comments

@nikitas-theo
Copy link

I run the following program to test scoping :

program ScopeDemo;
var A : integer;

  procedure ScopeInner;
  begin
    writeln (2)
  end;

  procedure AA;
  var A : integer;
     procedure CC;
     begin
        writeln (A)
     end;
  begin
    A := 999;
    CC();
  end;

begin
  A := 20;
  AA();
end.

This runs correctly on https://www.onlinegdb.com/online_pascal_compiler, an online Pascal compiler. On the Paskell I installed with docker, I had the following eror :
paskell: src/Emit.hs:(121,1)-(125,13): Non-exhaustive patterns in function genDeclVar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant