mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 23:28:28 +02:00

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 -
39 lines
561 B
ObjectPascal
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.
|