Created attachment 372
This patch should fix the problem.
--------------------
abstract class B { void foo(); }
interface I { void bar(); }
abstract class C : B, I {}
pragma(msg, __traits(allMembers, C).stringof);
--------------------
The above code prints:
--------------------
["foo","toString","toHash","opCmp","opEquals","Monitor","factory"]
--------------------
There is no "bar" in the output.
Comment #1 by rsinfu — 2009-05-17T04:22:47Z
Created attachment 373
Fixed a typo.
I'm sorry - there's a typo in the patch 372 :-(
Comment #2 by hoganmeier — 2010-02-04T18:33:54Z
Created attachment 561
patch for r365
Since I played around with this a little bit I thought I'd post the updated patch for current svn r365.
I wonder if there is a real world use case for this one.
But I think so. If you have an abstract base class that implements some interfaces but leaves some of the functions out for its base classes and you want to know which functions all base classes have in common you need this fix to also get the interface ones.
interface I { void bar(); }
interface I2 { void bar2(); }
abstract class B:I,I2 { void foo(); void bar();}
pragma(msg, __traits(allMembers, B));
Comment #3 by hoganmeier — 2010-02-06T06:25:16Z
Of course the last two occurences of "base class" must be "sub class" in my previous comment ;)