Default intrinsic with same parameter can't be used twice in method
Original Reporter info from Mantis: hnb
-
Reporter name: Maciej Izak
Original Reporter info from Mantis: hnb
- Reporter name: Maciej Izak
Description:
Default intrinsic with same parameter can't be used twice in method. I can't compile attached code:
------
{$MODE DELPHI}
type
TR<T> = record
end;
TA<T> = class
procedure Foo;
end;
procedure TA<T>.Foo;
var
r: TR<T>;
begin
r := Default(TR<T>);
r := Default(TR<T>); // Error: Duplicate identifier "zero_$P$PLC03_$$_TR$1"
end;
Mantis conversion info:
- Mantis ID: 25929
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 27320 (#a08e8ff9)