[Issue 2342] New: derived nested classes in derived outer class.
Jarrett Billingsley
jarrett.billingsley at gmail.com
Sun Sep 7 07:45:46 PDT 2008
On Sun, Sep 7, 2008 at 8:59 AM, <d-bugmail at puremagic.com> wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=2342
>
> Summary: derived nested classes in derived outer class.
> Product: D
> Version: 1.035
> Platform: PC
> OS/Version: Linux
> Status: NEW
> Severity: normal
> Priority: P2
> Component: DMD
> AssignedTo: bugzilla at digitalmars.com
> ReportedBy: benoit at tionex.de
>
>
> This should compile but does not.
>
> class A {
> class I1{
> }
> }
>
> class B : A {
> class I2 : I1 { // line 9
> }
>
> I1 getI(){
> return new I2;
> }
> }
> void main(){}
>
> test.d(9): class test.B.I2 is nested within B, but super class I1 is nested
> within A
>
>
> --
>
>
Are you *sure* this should compile or do you *want* it to compile?
There's a difference ;) I believe back in 0.126 when nested classes
were implemented, I suggested this to Walter and the official response
was "AIIIIIIEEEEEE", or something like that. Translation: probably
too much trouble to be worth it?
More information about the Digitalmars-d-bugs
mailing list