瀏覽代碼

+ added bugs 188-190

michael 27 年之前
父節點
當前提交
af5aa3d41a
共有 4 個文件被更改,包括 48 次插入0 次删除
  1. 17 0
      bugs/bug0188.pp
  2. 17 0
      bugs/bug0189.pp
  3. 10 0
      bugs/bug0190.pp
  4. 4 0
      bugs/readme.txt

+ 17 - 0
bugs/bug0188.pp

@@ -0,0 +1,17 @@
+type testfunc = function:longint;
+
+var test: testfunc;
+
+function test_temp: longint;
+begin
+  test_temp:=12;
+end;
+
+procedure sound(test: testfunc);
+begin
+  writeln(test);
+end; { proc. sound }
+
+begin
+  sound(test_temp);
+end.

+ 17 - 0
bugs/bug0189.pp

@@ -0,0 +1,17 @@
+var m: procedure;
+
+procedure test;
+begin
+end;
+
+procedure test2;
+begin
+end;
+
+begin
+ if @test <> @test2 then
+   writeln('different!');
+
+ if @m <> @test then
+   writeln('hi!');
+end.

+ 10 - 0
bugs/bug0190.pp

@@ -0,0 +1,10 @@
+procedure a(var b: boolean);
+begin
+  b:=true;
+end;
+
+var C: byte;
+
+begin
+  a(boolean(c));
+end.

+ 4 - 0
bugs/readme.txt

@@ -249,3 +249,7 @@ bug0171.pp   missing typecasting in constant expressions
 bug0183.pp   internal error 10
 bug0183.pp   internal error 10
 bug0185.pp   missing range checking for Val and subrange types
 bug0185.pp   missing range checking for Val and subrange types
 bug0187.pp   constructor in a WIth statement isn't called correct.
 bug0187.pp   constructor in a WIth statement isn't called correct.
+bug0188.pp   can't print function result of procedural var that returns a
+             function.
+bug0189.pp   cant compare adresses of function variables !!
+bug0190.pp   can't have typecast for var params ??