No Duplicate Identifier-Error if the duplicate identifier ist in a variant part of a record
Original Reporter info from Mantis: fubbel
-
Reporter name: Thomas Fabian
Original Reporter info from Mantis: fubbel
- Reporter name: Thomas Fabian
Description:
If a record has a variant part, detect the compiler duplicate identifiers in this variant part.
The compiler detect duplicate entries in the fixed part.
The compiler don't detect duplicate entries, when the one identifier is in the fixed part and one is in the variant part.
The compiler use the identifier in the variant part.
Steps to reproduce:
This is ok, the compiler find the error
TTest = record
Value: Byte;
Value: Word;
end;
TTest2 = record
case Integer of
0: (Value: Byte);
1: (Value: Word);
end;
And this is an error, but not found:
TTest = record
Value: Byte;
case Integer of
0: (Value: Word);
end;
Additional information:
Sizeof(TTest.Value) is 2 --> the compiler use the variant part.
Mantis conversion info:
- Mantis ID: 26704
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 28820 (#f6f304e0)
- Monitored by: » fubbel (Thomas Fabian)