[fpc-pascal] Operator overloading broken in 1.9.6?
Vinzent Hoefler
JeLlyFish.software at gmx.net
Mon Jan 3 13:57:14 CET 2005
Hi,
just installed 1.9.6 to see if any of our current code will break and
unfortunately I wasn't disappointed. ;-)
stripped down code:
-- 8< -- snip --
unit
StrTools;
interface
operator * (const C : Char; const Len : byte) s : String;
implementation
operator * (const C : Char; const Len : byte) s : string;
var
i : byte;
begin
s := '';
for i := 1 to Len do
s := s + C;
end {"*"};
end {StrTools}.
-- 8< -- snip --
This compiled fine with 1.0.10, but 1.9.6 now bails out with "Error:
Impossible operator overload" as early as at the line where the
operator is declared.
Is this a bug? A feature? Or just me being stupid?
Vinzent.
More information about the fpc-pascal
mailing list