View previous topic :: View next topic |
Author |
Message |
csauls
Joined: 27 Mar 2004 Posts: 278
|
Posted: Tue Oct 24, 2006 12:07 am Post subject: An oops in mango.containers.Container? |
|
|
In a recent build of Bovis I got the momentarily dizzying error message:
C:\DMD\src\mango\containers\Container.d(250): interface mango.containers.Container.MutableContainer!(Var *).MutableContainer base type must be interface, not mango.containers.Container.Container!(Var *).Container
Luckily, it was simple enough to figure out. Container has been 'remade' into an abstract class (cool, okay)... but, MutableContainer is still an interface. Hence: oops. _________________ Chris Nicholson-Sauls |
|
Back to top |
|
|
teqdruid
Joined: 11 May 2004 Posts: 390 Location: UMD
|
Posted: Tue Oct 24, 2006 11:02 am Post subject: Re: An oops in mango.containers.Container? |
|
|
csauls wrote: | In a recent build of Bovis I got the momentarily dizzying error message:
C:\DMD\src\mango\containers\Container.d(250): interface mango.containers.Container.MutableContainer!(Var *).MutableContainer base type must be interface, not mango.containers.Container.Container!(Var *).Container
Luckily, it was simple enough to figure out. Container has been 'remade' into an abstract class (cool, okay)... but, MutableContainer is still an interface. Hence: oops. |
Sorry- I'm not understanding you. Container has always been an abstract class. Once DMD got covariance, I added the interface MutableContainer for classes which were mutable, but that took place some time ago...
~John |
|
Back to top |
|
|
csauls
Joined: 27 Mar 2004 Posts: 278
|
Posted: Tue Oct 24, 2006 1:02 pm Post subject: |
|
|
Huh... I could've sworn it used to be... ah, whatever. I never have really delved all that deeply into mango.containers aside from what I've wanted to use for things.
Still, the actual error is the same: MutableContainer as an interface is declared as a child of a class, which D apparently disallows. (That this used to compile okay, is a mystery to me. It really should be allowed, I would say, with the inheritance as just another contract for the implementor to fulfill.) _________________ Chris Nicholson-Sauls |
|
Back to top |
|
|
teqdruid
Joined: 11 May 2004 Posts: 390 Location: UMD
|
Posted: Tue Oct 24, 2006 5:01 pm Post subject: |
|
|
csauls wrote: | Huh... I could've sworn it used to be... ah, whatever. I never have really delved all that deeply into mango.containers aside from what I've wanted to use for things.
Still, the actual error is the same: MutableContainer as an interface is declared as a child of a class, which D apparently disallows. (That this used to compile okay, is a mystery to me. It really should be allowed, I would say, with the inheritance as just another contract for the implementor to fulfill.) |
Ahhh I see the problem: previous versions of the compiler (such as 0.165, like I'm using) quitely accepted this, but didn't inherit the methods. I should change Container to be an interface so that this will work, but just doing that makes DMD complain! Damn! I thought I was through with this crap.
I'll be working on this, and there will probably be a complaint on the NG. |
|
Back to top |
|
|
teqdruid
Joined: 11 May 2004 Posts: 390 Location: UMD
|
Posted: Wed Nov 01, 2006 5:28 pm Post subject: |
|
|
teqdruid wrote: | I'll be working on this, and there will probably be a complaint on the NG. |
No complaint was necessary. I think I've got it working like we want by changing Container into an interface then jumping through some compiler hoops. In SVN now. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|