fpc/tests/webtbs/tw22741.pp
Jonas Maebe ad054831bb * save/restore itype and implementsgetter fields of timplementedinterface
to/from ppu, because it can be required while resolving type casts
    (mantis #22741)

git-svn-id: trunk@22266 -
2012-08-29 16:07:55 +00:00

30 lines
613 B
ObjectPascal
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ %recompile }
{ %opt=-gh }
program tw22741;
{$mode objfpc}
uses uw22741a;
type
te= class(td)
procedure address(d: td); virtual;
end;
procedure te.address(d: td);
var anIo: iIO;
begin
writeln(d.className);
writeln(nativeuint(iIO(d)));
writeln(nativeuint(iIO(d.fiio)));
anIo:= d;
writeln(nativeuint(anIo));
end;
var
e1, e2: te;
begin
e1:= te.create;
e2:= te.create;
e1.address(e2);
e1.destroy;
e2.destroy;
end.