how to determine if type is final/abstract

JS js.mdnq at gmail.com
Fri Jul 12 00:02:39 PDT 2013


On Friday, 12 July 2013 at 06:38:54 UTC, Jacob Carlborg wrote:
> On 2013-07-12 00:45, JS wrote:
>
>> 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?
>
> Have you tried using a mixin?
>
> __traits(isFinalFunction, mixin(className ~ "." ~ member));

yes, I've tried something similar(I used isFinalFunction). When I 
try it I get an error about the class not being found... I've 
tried to add the module name to it but it doesn't work. If I use 
your code directly on a simple test case it works as expected.

Also, if the function is overloaded I do not think I can get it 
to work correctly?



More information about the Digitalmars-d-learn mailing list