fpc/tests/webtbs/tw30357.pp
svenbarth 54b6cacf36 Fix for Mantis #30357.
Reset tstoredsymtable.init_final_check_done when a symbol is added or removed as otherwise property getters in a record *before* any managed field would trigger it, thus leading to the record being considered as "non-managed".

git-svn-id: trunk@34088 -
2016-07-08 18:20:47 +00:00

39 lines
561 B
ObjectPascal

program tw30357;
{$mode delphi}
type
TMyRecord = record
private
class function GetEmpty: TMyRecord; static;
public
class property Empty: TMyRecord read GetEmpty;
private
FData: IInterface;
end;
class function TMyRecord.GetEmpty: TMyRecord; static;
begin
end;
procedure Main2(Sender: TObject);
var
v1: PtrUInt;
begin
v1 := 42;
end;
procedure Main(Sender: TObject);
var
v1: TMyRecord;
begin
if v1.FData <> nil then
Halt(1);
end;
begin
{ with Main2 we ensure that the stack area is not 0 }
Main2(nil);
Main(nil);
end.