mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 12:09:30 +02:00
+ implicit unt test
This commit is contained in:
parent
8075e46f5d
commit
17cae537f2
16
tests/test/implprog.pp
Normal file
16
tests/test/implprog.pp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
uses impluni1;
|
||||||
|
|
||||||
|
Type
|
||||||
|
BEC_Single_Error = record
|
||||||
|
E : integer;
|
||||||
|
M : string [80];
|
||||||
|
end;
|
||||||
|
|
||||||
|
Const
|
||||||
|
BEC_Err_Msgs: array [0..1] of BEC_Single_Error =
|
||||||
|
((E : impluni1.ICanUseThis; M : '[1] No Error'),
|
||||||
|
(E : impluni2.ICantUseThis; M : '[10000] A Bug?'));
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
||||||
|
|
13
tests/test/impluni1.pp
Normal file
13
tests/test/impluni1.pp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
unit impluni1;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses impluni2;
|
||||||
|
|
||||||
|
const
|
||||||
|
ICanUseThis = 1;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
10
tests/test/impluni2.pp
Normal file
10
tests/test/impluni2.pp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
unit impluni2;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
const
|
||||||
|
ICantUseThis = 10000;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
end.
|
@ -44,3 +44,6 @@ Range checking ........ range.pp range checking when converting int64/
|
|||||||
range2.pp range checking when converting
|
range2.pp range checking when converting
|
||||||
between longint and cardinal
|
between longint and cardinal
|
||||||
range3.pp range checking for arrays
|
range3.pp range checking for arrays
|
||||||
|
Implicit units ........ implprog.pp compile the program twice, second time
|
||||||
|
impluni1.pp there's an error about not being able
|
||||||
|
impluni2.pp to use a constant
|
||||||
|
Loading…
Reference in New Issue
Block a user