Copy(S, 1) fails on ShortString: type mismatch
Original Reporter info from Mantis: kluug.net @onpok
-
Reporter name: Ondrej Pokorny
Original Reporter info from Mantis: kluug.net @onpok
- Reporter name: Ondrej Pokorny
Description:
Copy() with 2 arguments fails to compile with ShortString. It compiles fine with string or with 3 arguments.
Steps to reproduce:
program Project1;
{$mode objpas}{$h+}
var
SS: ShortString;
S: String;
begin
SS := Copy(SS, 1); // << project1.lpr(9,14) Error: Type mismatch
S := Copy(S, 1); // << OK
SS := Copy(SS, 1, 1); // << OK
end.
Mantis conversion info:
- Mantis ID: 34332
- Build: r39744
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 39802 (#bf91991b)