Summary: __traits getMember error in checking of second
           Product: D
           Version: 2.040
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: DMD

--- Comment #0 from iorlas <> 2010-01-26 15:50:48 PST ---
Created an attachment (id=557)
Example code

I've trying to get text representation of class, that can be changed in
development time.
For this problem i've used __traits functions "allModules",
"isVirtualFunction"(for filtering) and "getMember" for getting a type by member
name(from "allModules").
But i've stuck in "getMember".

>Error: string expected as second argument of __traits getMember instead of m
(see code in attachment)
>if (!__traits(isVirtualFunction, __traits(getMember, Check, m))){
As said in references:
>Takes two arguments, the second must be a string.

Ofc, m is normal string. I've tried to use "writeln(typeid(typeof(m)));" for
determinating a type of m-variable.
as printed in console. That means all ok.
But __traits still throws error.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to