mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 17:29:33 +02:00
compiler: allow to derive classes from a nested class type (issue #0016083)
git-svn-id: trunk@15036 -
This commit is contained in:
parent
8aaa5ee123
commit
1768810783
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -10319,6 +10319,7 @@ tests/webtbs/tw15909.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw1592.pp svneol=native#text/plain
|
tests/webtbs/tw1592.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw15930.pp svneol=native#text/plain
|
tests/webtbs/tw15930.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw16040.pp svneol=native#text/plain
|
tests/webtbs/tw16040.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw16083.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1617.pp svneol=native#text/plain
|
tests/webtbs/tw1617.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1622.pp svneol=native#text/plain
|
tests/webtbs/tw1622.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1623.pp svneol=native#text/plain
|
tests/webtbs/tw1623.pp svneol=native#text/plain
|
||||||
|
@ -458,7 +458,7 @@ implementation
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
id_type(def,isforwarddef);
|
id_type(def,isforwarddef);
|
||||||
{ handle types inside classes for generics, e.g. TNode.TLongint }
|
{ handle types inside classes, e.g. TNode.TLongint }
|
||||||
while (token=_POINT) do
|
while (token=_POINT) do
|
||||||
begin
|
begin
|
||||||
if parse_generic then
|
if parse_generic then
|
||||||
@ -466,7 +466,7 @@ implementation
|
|||||||
consume(_POINT);
|
consume(_POINT);
|
||||||
consume(_ID);
|
consume(_ID);
|
||||||
end
|
end
|
||||||
else if ((def.typ=objectdef) and (df_specialization in def.defoptions)) then
|
else if is_class(def) then
|
||||||
begin
|
begin
|
||||||
symtablestack.push(tobjectdef(def).symtable);
|
symtablestack.push(tobjectdef(def).symtable);
|
||||||
consume(_POINT);
|
consume(_POINT);
|
||||||
|
22
tests/webtbs/tw16083.pp
Normal file
22
tests/webtbs/tw16083.pp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{ %norun }
|
||||||
|
program tw16083;
|
||||||
|
|
||||||
|
{$ifdef fpc}
|
||||||
|
{$mode delphi}
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
type
|
||||||
|
TClass1 = class
|
||||||
|
public type
|
||||||
|
TNestedClass = class
|
||||||
|
end;
|
||||||
|
|
||||||
|
TNestedClass2 = class(TNestedClass)
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TClass3 = class(TClass1.TNestedClass)
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user