[Issue 6674] New: Regression(2.055) mixin and __traits(allMembers) generates incorrect result

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 15 03:07:13 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6674

           Summary: Regression(2.055) mixin and __traits(allMembers)
                    generates incorrect result
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2011-09-15 03:06:51 PDT ---
This is a regression of fixing issue 2234.
http://d.puremagic.com/issues/show_bug.cgi?id=2234

Reported in newsgroup.
http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=144529


> mixin template Members(){
>  static int i1;
>  static int i2;
>  static int i3;  //comment out to make func2 visible
>  static int i4;  //comment out to make func1 visible
> }
> 
> class Test {
>  mixin Members;
> 
>  typedef void function() func1;
>  typedef bool function() func2;
> 
>  static void init(){
>    foreach(m;__traits(allMembers,Test)){
>      pragma(msg,m);
>    }
>  }
> }
> 
> int main(string[] argv)
> {
>  return 0;
> }
> 
> Gives me the output:
> i1
> i2
> i3
> i4
> toString
> toHash
> opCmp
> opEquals
> Monitor
> factory

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list