how to determine if type is final/abstract
JS
js.mdnq at gmail.com
Thu Jul 11 15:45:45 PDT 2013
I have some code that needs to determine if a type
isFinalFunction or isAbstractFunction but they don't seem to work:
foreach(k, t; TargetMembers)
{
alias TypeTuple!(t.type)[0] type;
if (isFinalFunction!(t)) { ... }
}
the if statement never gets executed. I've tried using type
instead of t and various other things. I suppose the
the function is defined as
final string foo() { ...}
but TargetMembers is
"tuple(FuncInfo!("foo", pure nothrow @safe string()),
FuncInfo!("Value", @property int()), FuncInfo!("Value", @property
int(int value)))"
I believe the issue is that isFinalFunction requires an actual
function symbol but I'm passing it a string?
How can I get this to work?
More information about the Digitalmars-d-learn
mailing list