Explorar el Código

* cross unit reference to a hidden unit

peter hace 23 años
padre
commit
d3533891fe
Se han modificado 4 ficheros con 62 adiciones y 0 borrados
  1. 16 0
      tests/tbs/tb0421.pp
  2. 14 0
      tests/tbs/ub0421a.pp
  3. 12 0
      tests/tbs/ub0421b.pp
  4. 20 0
      tests/tbs/ub0421c.pp

+ 16 - 0
tests/tbs/tb0421.pp

@@ -0,0 +1,16 @@
+{ %version=1.1 }
+{ %recompile }
+
+uses ub0421a;
+
+var
+  c : cl3;
+begin
+  c:=cl3.create;
+  writeln(c.f);
+  if (c.f<>10) then
+   begin
+     writeln('Error!');
+     halt(1);
+   end;
+end.

+ 14 - 0
tests/tbs/ub0421a.pp

@@ -0,0 +1,14 @@
+unit ub0421a;
+interface
+{$mode objfpc}
+
+  uses ub0421b;
+
+type
+  cl3=class(cl2)
+    property f:longint read f1;
+  end;
+
+ implementation
+ end.
+ 

+ 12 - 0
tests/tbs/ub0421b.pp

@@ -0,0 +1,12 @@
+unit ub0421b  ;
+interface
+{$mode objfpc}
+
+  uses ub0421c;
+type
+  cl2=class(cl1)
+  end;
+
+ implementation
+ end.
+ 

+ 20 - 0
tests/tbs/ub0421c.pp

@@ -0,0 +1,20 @@
+unit ub0421c;
+interface
+
+{$mode objfpc}
+
+type
+  cl1=class
+    f1:longint;
+    constructor create;
+  end;
+
+implementation
+
+    constructor cl1.create;
+    begin
+      f1 := 10;
+    end;
+
+end.
+