FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

An oops in mango.containers.Container?

 
Post new topic   Reply to topic     Forum Index -> Mango
View previous topic :: View next topic  
Author Message
csauls



Joined: 27 Mar 2004
Posts: 278

PostPosted: Tue Oct 24, 2006 12:07 am    Post subject: An oops in mango.containers.Container? Reply with quote

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. Smile Container has been 'remade' into an abstract class (cool, okay)... but, MutableContainer is still an interface. Hence: oops.
_________________
Chris Nicholson-Sauls
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Tue Oct 24, 2006 11:02 am    Post subject: Re: An oops in mango.containers.Container? Reply with quote

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. Smile 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
View user's profile Send private message Send e-mail AIM Address
csauls



Joined: 27 Mar 2004
Posts: 278

PostPosted: Tue Oct 24, 2006 1:02 pm    Post subject: Reply with quote

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. Smile

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
View user's profile Send private message AIM Address Yahoo Messenger
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Tue Oct 24, 2006 5:01 pm    Post subject: Reply with quote

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. Smile

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
View user's profile Send private message Send e-mail AIM Address
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Wed Nov 01, 2006 5:28 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Mango All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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