When I try to compile a unit in delphi mode with the following function
function Implements(out AReference; const AObject: TObject; const
AInterface: TGUID): Boolean;
Result := (AObject is TInterfacedObject) and
((AObject as TInterfacedObject).QueryInterface(AInterface, AReference) = 0);
Utilities.pas(33,44) Error: identifier idents no member "QueryInterface"
Utilities.pas(33,58) Fatal: Syntax error, ")" expected but "(" found
Utilities.pas(33,58) Error: Compilation aborted