Bug 2989 – InterfacesTuple incorrectly implemented

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2009-05-15T21:03:00Z
Last change time
2015-06-09T01:27:56Z
Keywords
patch
Assigned to
andrei
Creator
rsinfu

Attachments

IDFilenameSummaryContent-TypeSize
369issue_interfacestuple.patchThis patch should fix the problem.text/plain582
370issue_interfacestuple.patchreimplements InterfacesTupletext/plain2552

Comments

Comment #0 by rsinfu — 2009-05-15T21:03:49Z
Created attachment 369 This patch should fix the problem. InterfacesTuple!(T) causes a compile error when T is an interface.
Comment #1 by rsinfu — 2009-05-15T22:51:27Z
Created attachment 370 reimplements InterfacesTuple InterfacesTuple is not correctly implemented. The result of InterfacesTuple does not contain indirectly inherited interfaces, whereas the documentation says it does. I reimplemented InterfacesTuple so that it conforms to the documentation. This should compile: -------------------- import std.traits; interface Iaa {} interface Ia : Iaa {} interface I : Ia {} static assert(is(InterfacesTuple!(I) == TypeTuple!(Ia, Iaa))); --------------------
Comment #2 by andrei — 2009-08-27T19:08:49Z
Thanks for the fix!