fpc/tests/webtbs/tw26075b.pp
2014-11-23 22:05:40 +00:00

36 lines
484 B
ObjectPascal

program fpc_advrec_bug;
{$mode delphi}
{$optimization off}
Uses TypInfo;
Type
PTypeInfoRec = object
FValue : PTypeInfo;
Function QualifiedName : String;
End;
Function PTypeInfoRec.QualifiedName : String;
Begin
Result := '';
End;
function Test : Pointer;
Begin
Result := nil;
End;
Var
p : PTypeInfo;
begin
PTypeInfoRec(p).QualifiedName; // OK
PTypeInfoRec(Test).QualifiedName; // OK
PTypeInfoRec(TypeInfo(String)).QualifiedName; // Internal error 200304235
end.