D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6674 - Regression(2.055) mixin and __traits(allMembers) generates incorrect result
Summary: Regression(2.055) mixin and __traits(allMembers) generates incorrect result
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 regression
Assignee: No Owner
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-09-15 03:06 UTC by Kenji Hara
Modified: 2011-09-16 21:57 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kenji Hara 2011-09-15 03:06:51 UTC
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