D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 14581 - Allow inheriting from nested classes outside of parent class
Summary: Allow inheriting from nested classes outside of parent class
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-14 01:38 UTC by Vladimir Panteleev
Modified: 2024-12-13 18:42 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Vladimir Panteleev 2015-05-14 01:38:08 UTC
// test.d //
class C
{
    class D
    {
    }
}

class E:C.D
{
}
///////////

test.d(8,1): Error: class test.E is nested within test, but super class D is nested within C
Comment 1 TeddyBear12311 2019-08-15 01:00:42 UTC
Bang? Anyone?

not just nested classes but within functions

void foo()
{
   class C { }
}

C cannot be used. foo could be main.
Comment 2 dlangBugzillaToGithub 2024-12-13 18:42:51 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/18989

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB