浏览代码

* Compiler now catches the error already at compiler time. Use a variable
to force checking at runtime.

git-svn-id: trunk@7930 -

daniel 18 年之前
父节点
当前提交
30f733eed5
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      tests/tbs/tb0412.pp

+ 3 - 1
tests/tbs/tb0412.pp

@@ -6,6 +6,7 @@ uses
 
 var
    a : array of longint;
+   b : longint;
 
 begin
    try
@@ -19,7 +20,8 @@ begin
        a[3]:=1;
      except
        try
-         a[-1]:=1;
+         b:=-1;
+         a[b]:=1;
        except
          halt(0);
        end;