Bug 6674 – Regression(2.055) mixin and __traits(allMembers) generates incorrect result

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-09-15T03:06:00Z
Last change time
2011-09-16T21:57:40Z
Keywords
patch
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2011-09-15T03:06:51Z
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
Comment #1 by k.hara.pg — 2011-09-15T03:47:52Z
Comment #2 by bugzilla — 2011-09-16T21:57:40Z