procedure P(J: ITest);
var
  I: ITest;
  X: TTest;
  S: Integer;
begin
  I := J;
  S := I.Prop;
  PrintInt(S);
  J.QueryInterface(ITest, I);
  J._Release;
  S := I.Prop;
  PrintInt(S);
end;
begin
  P(TTest.Create);
end.
