It is a bug?
    Kozzi11 via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Wed Jul 30 00:08:16 PDT 2014
    
    
  
#main.d:
import m.f;
class A {
     //class main.A member m is not accessible
     //mixin(t!(typeof(this), "m"));
     void m() {};
     //here is ok
     //mixin(t!(typeof(this), "m"));
}
void main(string[] args){}
#m.f
module m.f;
string t(alias cls, string method)() {
     import std.traits;
     static if (isSomeFunction!(__traits(getMember, cls, method))) 
{}
     return "";
}
But when I put content from m.f into main.d everything works ok. 
Or even when I change __traits(getMember, cls, method) to cls.m 
everything works, but even with mixin it doesnt work 
(mixin("cls.m"))
    
    
More information about the Digitalmars-d-learn
mailing list