Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
September 07, 2008 [Issue 2342] New: derived nested classes in derived outer class. | ||||
---|---|---|---|---|
| ||||
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@digitalmars.com ReportedBy: benoit@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 -- |
September 07, 2008 Re: [Issue 2342] New: derived nested classes in derived outer class. | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | On Sun, Sep 7, 2008 at 8:59 AM, <d-bugmail@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@digitalmars.com
> ReportedBy: benoit@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?
|
September 07, 2008 Re: [Issue 2342] New: derived nested classes in derived outer class. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley schrieb:
> On Sun, Sep 7, 2008 at 8:59 AM, <d-bugmail@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@digitalmars.com
>> ReportedBy: benoit@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 :)
|
September 08, 2008 Re: [Issue 2342] New: derived nested classes in derived outer class. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frank Benoit | Frank Benoit wrote: > I don't know. I had *expected* this to work :) This was the answer: http://www.digitalmars.com/webnews/newsgroups.php? art_group=digitalmars.D.announce&article_id=783 Do you have acompelling example? -manfred -- If life is going to exist in this Universe, then the one thing it cannot afford to have is a sense of proportion. (Douglas Adams) |
September 08, 2008 Re: [Issue 2342] New: derived nested classes in derived outer class. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred_Nowak | Manfred_Nowak schrieb:
> Frank Benoit wrote:
>
>> I don't know. I had *expected* this to work :)
>
> This was the answer: http://www.digitalmars.com/webnews/newsgroups.php? art_group=digitalmars.D.announce&article_id=783
>
> Do you have acompelling example?
> -manfred
>
In real live Java code i found this constellation while porting it. Sure, i found a workaround, but that is not nice.
|
January 20, 2009 [Issue 2342] derived nested classes in derived outer class. | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2342 ------- Comment #1 from helmutduregger@gmx.at 2009-01-20 05:07 ------- Seems to be related to http://d.puremagic.com/issues/show_bug.cgi?id=1175 -- |
September 10, 2009 [Issue 2342] derived nested classes in derived outer class. | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2342 David Ferenczi <david@ferenczi.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |david@ferenczi.net Resolution| |DUPLICATE --- Comment #2 from David Ferenczi <david@ferenczi.net> 2009-09-10 05:43:28 PDT --- *** This issue has been marked as a duplicate of issue 1175 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation