In one file, I have a baseclass with a ID-property:
type
TBase = class(TObject)
private
FID: integer;
public
property ID: integer read FID write SetID;
end;
In a second file, I have another class, descending from TBase. By accident, or ignorance or what ever, a new property/field with the same name as an exsisting property/field was made.
type
TSub = class(TBase)
private
FID: Longword;
public
property ID: Longword read FID write FID;
end;
The second ID-fields is of course renamed, but why does the compiler allow this?
When accessing ID in code - which ID-field is used?