Commit d4e573c1 authored by Sven/Sarah Barth's avatar Sven/Sarah Barth
Browse files

* fix for Mantis #27349: nested classes might also reside inside records

+ added test

git-svn-id: trunk@34714 -
parent 254be82c
......@@ -15029,6 +15029,7 @@ tests/webtbs/tw27300a.pp svneol=native#text/pascal
tests/webtbs/tw2731.pp svneol=native#text/plain
tests/webtbs/tw27320.pp svneol=native#text/pascal
tests/webtbs/tw27348.pp svneol=native#text/pascal
tests/webtbs/tw27349.pp svneol=native#text/pascal
tests/webtbs/tw2736.pp svneol=native#text/plain
tests/webtbs/tw2737.pp svneol=native#text/plain
tests/webtbs/tw2738.pp svneol=native#text/plain
......
......@@ -2956,7 +2956,7 @@ if defowner.typ=recorddef then
) or
(
assigned(contextobjdef) and
(contextobjdef.owner.symtabletype in [globalsymtable,staticsymtable,ObjectSymtable]) and
(contextobjdef.owner.symtabletype in [globalsymtable,staticsymtable,ObjectSymtable,recordsymtable]) and
(contextobjdef.owner.iscurrentunit) and
def_is_related(contextobjdef,symownerdef)
) or
......
{ %NORUN }
program tw27349;
{$mode delphi}
{.$mode objfpc}
{.$modeswitch advancedrecords}
type
C = class
type
tmyintf = class(TInterfacedObject, iinterface)
function _AddRef : longint; stdcall;
end;
end;
R = record
type
tmyintf = class(TInterfacedObject, iinterface)
function _AddRef : longint; stdcall;
end;
end;
function C.tmyintf._AddRef: longint; stdcall;
begin
result := inherited _AddRef; // OK
end;
function R.tmyintf._AddRef: longint; stdcall;
begin
result := inherited _AddRef; // FAIL
end;
begin
end.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment