On Tue, Aug 16, 2011 at 12:25 AM, Jonathan M Davis <[email protected]>wrote:
> On Tuesday, August 16, 2011 00:10:20 Andrew Wiley wrote: > > On Mon, Aug 15, 2011 at 11:31 PM, Jonathan M Davis > <[email protected]>wrote: > > > On Tuesday, August 16, 2011 02:03:45 Andrew Wiley wrote: > > Yes, it makes no sense to allocate an instance of an interface. I don't > see > > how that's relevant here. > > I obviously skimmed over your question too quickly. My apologies. > It's all good. Okay, looking at std.typecons, it looks like what's happening is that it's > barfing when it tries to instantiate destroy to clean up the object in > Scoped!T's destructor. And when it does that, it calls each destructor > along > the inheritance path, and destroy doesn't work with interfaces. > What bothers me is this: /usr/include/d2/4.6.0/std/typecons.d:2571: Error: template std.typecons.destroy(T) if (is(T == class)) cannot deduce template function from argument types !()(A,Bob) It looks like getting the superclass is actually getting a typetuple or something. We have two arguments where we should just have one. I'd suggest that you create a bug report for it. Obviously, scoped needs > some > reworking to make it handle interfaces in the inheritance path. They > obviously > don't need to be destroyed, but since it doesn't special-case interfaces, > it > tries to destroy them, which doesn't compile, so the scoped doesn't > compile. Alright, I'll go ahead and open one.
