Ver Fonte

+ test for double usage of units

Jonas Maebe há 22 anos atrás
pai
commit
f35267db01
3 ficheiros alterados com 24 adições e 0 exclusões
  1. 4 0
      tests/tbf/tb0158.pp
  2. 13 0
      tests/tbf/ub0158a.pp
  3. 7 0
      tests/tbf/ub0158b.pp

+ 4 - 0
tests/tbf/tb0158.pp

@@ -0,0 +1,4 @@
+uses ub0158a;
+
+begin
+end.

+ 13 - 0
tests/tbf/ub0158a.pp

@@ -0,0 +1,13 @@
+unit ub0158a;
+
+interface
+
+uses ub0158b;
+
+implementation
+
+{ should give "duplicate identifier error", because already used in the }
+{ interface                                                             }
+uses ub0158b;
+
+end.

+ 7 - 0
tests/tbf/ub0158b.pp

@@ -0,0 +1,7 @@
+unit ub0158b;
+
+interface
+
+implementation
+
+end.