mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 20:08:12 +02:00
18 lines
266 B
ObjectPascal
18 lines
266 B
ObjectPascal
{ tests if '' is optimized properly in string concatenations }
|
|
var
|
|
s1 : string;
|
|
s2 : string;
|
|
|
|
begin
|
|
s1:='asdf';
|
|
if s1+''<>s1 then
|
|
halt(1);
|
|
s1:='asdf';
|
|
if ''+s1<>s1 then
|
|
halt(1);
|
|
|
|
if ''+s2+''+s1+''<>s2+s1 then
|
|
halt(1);
|
|
|
|
writeln('ok');
|
|
end. |