class can't have two default properties with same name
Original Reporter info from Mantis: Nicky
-
Reporter name: Nick
Original Reporter info from Mantis: Nicky
- Reporter name: Nick
Description:
Have two default properties with same name. In Delphi xe2 it's ok.
Error: Duplicate identifier "Values"
Hint: Identifier already defined in CustomDataSetDataModel.pas at line 14
Error: Only one default property is allowed
Steps to reproduce:
{$mode delphi}
unit Unit2;
interface
type
TDsRecord = class
private
function GetValueByIdx(Index: Integer): Variant;
function GetValueByName(const FieldName: string): Variant;
procedure SetValueByIdx(Index: Integer; const Value: Variant);
procedure SetValueByName(const FieldName: string; const Value: Variant);
public
property Values[Index: Integer]: Variant read GetValueByIdx write SetValueByIdx; default;
property Values[const FieldName: string]: Variant read GetValueByName write SetValueByName; default;
end;
implementation
end.
Mantis conversion info:
- Mantis ID: 29056
- OS: Windows
- OS Build: 7
- Build: RC2
- Platform: x86
- Version: 3.0.0
- Monitored by: » Nick_nnn (Николай)