On 2018-03-25 00:09, Ondrej Pokorny wrote:
I found the source of my assumption, I get a compiler warning in this
case:
program StringsTest;
function Test: string;
var S: string;
begin
S := S + 'a';
Result := S;
end;
begin
Writeln(Test);
end.
Emits:
StringsTest.lpr(5,8) Warning: Local variable "S" of a managed type
does not seem to be initialized
Why do I get the compiler warning when the variable is indeed
guaranteed to be initialized to nil/empty string?
https://bugs.freepascal.org/view.php?id=24601
Jonas
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel