The following program

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

If I comment out i4:
i1
i2
i3
func1
toString
...

And if I comment out i3 in addition to i4:
i1
i2
func1
func2
toString
...

Is this some new feature of mixin I'm missing, oder is this a bug?
Started to happen in dmd 2.055 does not happen with dmd 2.054

--
Kind Regards
Benjamin Thaut

Reply via email to