http://d.puremagic.com/issues/show_bug.cgi?id=3744
Summary: __traits getMember error in checking of second argument Product: D Version: 2.040 Platform: x86_64 OS/Version: Linux Status: NEW Severity: blocker Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: denis.tomi...@gmail.com --- Comment #0 from iorlas <denis.tomi...@gmail.com> 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) in >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. >immutable(char)[] as printed in console. That means all ok. But __traits still throws error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------