Skip to content

Error on nested function program.  #10

Description

@nikitas-theo

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions