fpc/tests/webtbs/tw26403.pp
florian 4289dd667d * managed types cause a different warning/hint when they are
used uninitialized, so users can turn off these messages if they want, resolves #24601 and #26403

git-svn-id: trunk@29295 -
2014-12-14 20:48:54 +00:00

24 lines
404 B
ObjectPascal

{ %OPT=-Sew }
{$OPTIMIZATION DFA}
{$HINTS ON}
program test;
type
TIntArray = array of Integer;
procedure Reset(var Foo: TIntArray);
begin
SetLength(Foo, 0);
end;
procedure Foo(var Bar: TIntArray);
begin
Reset(Bar); // Hint: Local variable "Bar" does not seem to be initialized
end;
var
Baz: TIntArray;
begin
Foo(Baz); // Hint: Local variable "Baz" does not seem to be initialized
end.