Thread overview
[Issue 6674] New: Regression(2.055) mixin and __traits(allMembers) generates incorrect result
Sep 15, 2011
Kenji Hara
Sep 15, 2011
Kenji Hara
Sep 17, 2011
Walter Bright
September 15, 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@puremagic.com
        ReportedBy: k.hara.pg@gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg@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: -------
September 15, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6674


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-09-15 03:47:52 PDT ---
https://github.com/D-Programming-Language/dmd/pull/385

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 17, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6674


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2011-09-16 21:57:40 PDT ---
https://github.com/D-Programming-Language/dmd/commit/aa02f484a6a697727706d7fb13764411322cf05d

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