mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 06:29:38 +02:00
* new macro expansion problem
This commit is contained in:
parent
f11951edf2
commit
46472dc0da
23
tests/tbs/tb0472.pp
Normal file
23
tests/tbs/tb0472.pp
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{$macro on}
|
||||||
|
|
||||||
|
{$define aaa:=1234}
|
||||||
|
{$define bbb:=4321}
|
||||||
|
|
||||||
|
{$define ccc:=aaa} // here aaa is already defined macros
|
||||||
|
|
||||||
|
var
|
||||||
|
err : boolean;
|
||||||
|
begin
|
||||||
|
err:=true;
|
||||||
|
{$if aaa=ccc} // condition is equal
|
||||||
|
// but compiler not compiling this block, because
|
||||||
|
// don't take into account that value of macros ccc is macros also.
|
||||||
|
err:=false;
|
||||||
|
writeln('success');
|
||||||
|
{$else}
|
||||||
|
writeln('failure');
|
||||||
|
{$endif}
|
||||||
|
if err then
|
||||||
|
halt(1);
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user