12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- { %NORUN }
- program tw27349;
- {$mode delphi}
- {.$mode objfpc}
- {.$modeswitch advancedrecords}
- type
- C = class
- type
- tmyintf = class(TInterfacedObject, iinterface)
- function _AddRef : longint; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
- end;
- end;
- R = record
- type
- tmyintf = class(TInterfacedObject, iinterface)
- function _AddRef : longint; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
- end;
- end;
- function C.tmyintf._AddRef: longint; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
- begin
- result := inherited _AddRef; // OK
- end;
- function R.tmyintf._AddRef: longint; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
- begin
- result := inherited _AddRef; // FAIL
- end;
- begin
- end.
|