For p in do... Error messages incorrect
Original Reporter info from Mantis: Peter H
-
Reporter name: Peter H
Original Reporter info from Mantis: Peter H
- Reporter name: Peter H
Description:
I tested, if this might work and got errormessages
The error messages are not correct. (Lazarus 2.1.0 r64417 FPC 3.3.1 x86_64-win64-win32/win64)
Program appended
Steps to reproduce:
program Project1;
type
Ts = array of char;
Tp = ^char;
var s: array of char = Nil;
p: ^char;
s2: Ts; // Initialisation to Nil results in compile error here
p2: Tp;
begin
for p in s do; //project1.lpr(13,5) Error: Incompatible types: got "Char" expected "^Char"
for p2 in s2 do; //project1.lpr(15,5) Error: Incompatible types: got "Char" expected "Tp"
// Note these error messages refer to pos5 in the line, this means to p and p2
end.
Mantis conversion info:
- Mantis ID: 38416
- Version: 3.3.1