Array with char index could not compile
Original Reporter info from Mantis: alexx
-
Reporter name: Alexander Todorov
Original Reporter info from Mantis: alexx
- Reporter name: Alexander Todorov
Description:
An array that uses Char for its index could not compile when index is a cyrillic character. Perhaps not working with all characters except English.
See program source.
Steps to reproduce:
program project1;
{$mode objfpc}{$H+}
uses SysUtils;
var ATable : Array[Char] of Char;
begin
// 'Ф' is upper case Bulgarian letter corresponding to English 'F'
ATable['F'] := 'F'; // <-- compiles ok
ATable['F'] := 'Ф'; // <-- Error: Incompatible types: got "AnsiString" expected "Char". Error in assignment.
ATable['Ф'] := 'Ф'; // <-- Error: Incompattible types: got "AnsiString" expected "Longint". Error in array index
end.
Mantis conversion info:
- Mantis ID: 7122
- OS: Linux
- Platform: x86
- Fixed in version: 2.0.4
- Fixed in revision: 4102 (#d593c10a)