compile time error: Incompatibel types: got "SYSTEM.PChar" expected "SYSTEM.PChar"
Original Reporter info from Mantis: roked
-
Reporter name: Marģers
Original Reporter info from Mantis: roked
- Reporter name: Marģers
Description:
Compiler does not accept pointer arithmetic for type PChar for
constant variables.
Steps to reproduce:
type tz = record
name : pchar;
end;
const aa :array[0..2] of char = 'aa'#0;
const testArrZ : array [0..2] of tz = (
(name: @aa), { Ok }
(name: pchar(@aa)), { Ok }
(name: pchar(@aa)+1) {Error: Incompatibel types: got "SYSTEM.PChar" expected "SYSTEM.PChar" }
);
var b : pchar;
begin
b:=pchar(@aa)+1; {Ok}
end.
Mantis conversion info:
- Mantis ID: 34027
- OS: linux
- Platform: x86_64
- Version: 3.1.1
- Fixed in version: 3.3.1
- Fixed in revision: 48514 (#d0910b5a)