@getArrayPtr[i] errors
Original Reporter info from Mantis: nanobit @nanobit
-
Reporter name:
Original Reporter info from Mantis: nanobit @nanobit
- Reporter name:
Description:
getting an element pointer (PInteger)
via function result (which is array-pointer PIntArray):
{$mode delphi}, {$modeswitch autoderef}
type PIntArray = ^TIntArray;
type TIntArray = array[0..3] of integer;
In the test project, see:
p := @getArrayPtr^[1]; // Error: Illegal qualifier
p := @(getArrayPtr^[1]); // at runtime: wrong pointer
p := @(gate.getArrayPtr[1]); // Fatal: Syntax error, ")" expected but "[" found
p := @gate.getArrayPtr[1]; // Error: Illegal qualifier
For comparison, no problems with counterparts to above:
p := @gate.getArrayPtr^[1]; // ok
p := @(pints^[1]); // ok
p := @(getArrayPtr[1]); // ok
p := @getArrayPtr[1]; // ok
Additional information:
Product Version 3.2 was not selectable in this report form.
Mantis conversion info:
- Mantis ID: 36658
- OS: Windows
- OS Build: 10
- Build: FPC 3.2
- Platform: win32