Can't seemed to get parent name from a class at compile time.
12345swordy
alexanderheistermann at gmail.com
Fri Dec 15 17:16:41 UTC 2017
import std.stdio;
class bob
{
}
class tom : bob
{
}
void main()
{
writeln(__traits(identifier,__traits(parent,tom)));
}
Am I doing this right? I am expecting it to print "bob".
More information about the Digitalmars-d-learn
mailing list