bogus 'Function result variable of a managed type does not seem to be initialized' message
Original Reporter info from Mantis: Hixie
-
Reporter name: Ian Hickson
Original Reporter info from Mantis: Hixie
- Reporter name: Ian Hickson
Description:
Compiling the following program generates the bogus hint given in the comment in the source on that line:
{$MODE OBJFPC}
{$HINTS ON}
{$OPTIMIZATION OFF}
program main;
function Test(): UTF8String;
begin
SetLength(Result, 1); // Hint: Function result variable of a managed type does not seem to be initialized
Result[1] := 'A';
end;
begin
Writeln(Test());
end.
Mantis conversion info:
- Mantis ID: 36973
- Build: 3.3.1 [2020/04/22] for x86_64