Passing char indexed array as open array does not work
Original Reporter info from Mantis: Nitorami
-
Reporter name:
Original Reporter info from Mantis: Nitorami
- Reporter name:
Description:
-
When passing an array indexed by chars (array ['a'..'z'] of integer) to a procedure as open array, the compiler throws an error "operator is not overloaded 'char' - 'char'". Apparently, the compiler has no procedure to subtract the array bounds.
-
More severe, when doing the same with an invalid array declaration such as
array ['a'..'zz'] of integer;
or
array ['a'..'z'*3] of integer;
the compiler crashes (signal 291).
Steps to reproduce:
compile attached code
Additional information:
This came up in the forum http://forum.lazarus.freepascal.org/index.php/topic,38833.0.html
Mantis conversion info:
- Mantis ID: 32645
- OS: windows
- OS Build: 10
- Platform: PC
- Version: 3.0.2
- Fixed in version: 3.1.1
- Fixed in revision: 37928 (#53bef8d2)