Conditional compilation. Identifiers from another unit are not visible inside uses clause
Original Reporter info from Mantis: kazalex
-
Reporter name: Kazantsev Alexey
Original Reporter info from Mantis: kazalex
- Reporter name: Kazantsev Alexey
Description:
------------------
unit ns1;
{$mode delphi}
interface
type
Platform = Record
Const cWindows = True;
End;
implementation
end.
------------------
program ns;
{$mode delphi}
uses ns1 {if Platform.cWindows}, Windows{
ifend}; // uncompilable here
begin
{if Platform.cWindows}{
ifend} // but compilable here
end.
------------------
ns.pas(5,14) Error: Compile time expression: Wanted Boolean but got AnsiString at IF or ELSEIF
ns1.pas(13,1) Fatal: There were 1 errors compiling module, stopping
ns1.pas(0) Fatal: Compilation aborted
Mantis conversion info:
- Mantis ID: 25011
- Version: 2.7.1
- Monitored by: » kazalex (Kazantsev Alexey)