Is this a new bug ?
Newbie2019
newbie2019 at gmail.com
Sat Jul 20 03:31:41 UTC 2019
template Test(alias T){
pragma(msg, T.stringof);
enum Test = T.stringof;
}
string t1;
void t2(){}
void t3(string s){}
extern(C) void main(){
enum x1 = Test!(t1); // ok
enum x2 = Test!(t2); // expect t2, but get t2()
enum x3 = Test!(t3); // Error: function
test2.t3(string s) is not callable using argument types ()
}
I want get the function name "t2", "t3" for string mixin, how do
I do this in D ?
More information about the Digitalmars-d-learn
mailing list