Failed compilation of late binding: Compiler only accepts integer as (late binding) arrayindex
Original Reporter info from Mantis: jiri
-
Reporter name: Jiri Hajek
Original Reporter info from Mantis: jiri
- Reporter name: Jiri Hajek
Description:
FPC generally speaking can properly compile most late binding code I tried while trying to convert MediaMonkey to FPC. However, there's a problem with string indexed property, which compiles and works flawlessly with Delphi, but not in FPC
See Steps To Reproduce for a sample code.
Error reported is: Incompatible types: got "ShortString" expected "LongInt"
Steps to reproduce:
{$mode delphi}
var
v: Variant;
USBID: String;
devlist: Variant;
begin
devlist := v.ActiveDeviceList[ USBID];
end.
Mantis conversion info:
- Mantis ID: 16054
- OS: Windows
- OS Build: 7
- Platform: Windows
- Version: 2.4.0
- Fixed in version: 2.6.0
- Fixed in revision: 16864 (#71cce971)
- Monitored by: » jiri (Jiri Hajek)