Indexing an array with a Variant silently fails
Original Reporter info from Mantis: Kornel Kisielewicz
-
Reporter name: Kornel Kisielewicz
Original Reporter info from Mantis: Kornel Kisielewicz
- Reporter name: Kornel Kisielewicz
Description:
When using a Variant to index an array the indexing silently fails.
v := 7;
SomeArray[ v ] := 1; // nothing happens
Maybe it's the proper behavior in terms of Delphi compatibility, but still, such a silent failure of something that seems so obvious should produce at least a warning.
Steps to reproduce:
Run attached program.
Additional information:
The program returns 0000000000 on 2.4.4 and 2.7.1 trunk, both on Linux and Windows. The sad thing is that former versions did index correctly (tested with an online 2.2 compiler).
Mantis conversion info:
- Mantis ID: 20873
- OS: Windows
- OS Build: 7
- Platform: x64
- Version: 2.7.1
- Fixed in version: 2.6.1
- Fixed in revision: 20427 (#75aac428)