Paskell icon indicating copy to clipboard operation
Paskell copied to clipboard

Error on nested function program.

Open nikitas-theo opened this issue 3 years ago • 0 comments

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

nikitas-theo avatar May 13 '21 16:05 nikitas-theo