[Issue 2342] New: derived nested classes in derived outer class.
Frank Benoit
keinfarbton at googlemail.com
Sun Sep 7 08:04:23 PDT 2008
Jarrett Billingsley schrieb:
> 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?
I don't know. I had *expected* this to work :)
More information about the Digitalmars-d-bugs
mailing list