Determine if a member is a method
Frustrated
c1514843 at drdrb.com
Wed Jan 1 09:19:00 PST 2014
On Wednesday, 1 January 2014 at 15:10:56 UTC, Dicebot wrote:
>> On 2014-01-01 08:43, Frustrated wrote:
>>
>>> Also, how does one get the exact code string of a member
>>> instead of
>>> having to piece it together from info from std.traits? (which
>>> requires a
>>> lot of work)?
>
> Have a look at
> https://github.com/rejectedsoftware/vibe.d/blob/master/source/vibe/internal/meta/codegen.d#L177
> (cloneFunction) for inspiration (it is based on
> fullyQualifiedName from Phobos)
There seems to be a bug. When I run it on a standard member it
works fine. When I run it on a property it throws an error
src\phobos\std\traits.d(344): Error: forward reference of
variable parentPrefix
src\phobos\std\traits.d(505): Error: template instance
std.traits.fullyQualifiedNameImplForSymbols!(Array!double) error
instantiating
src\phobos\std\traits.d(295): instantiated from here:
fullyQualifiedNameImplForTypes!(Array!double, false, false,
false, false)
(admittedly it might not suppose be used on properties but it
shouldn't crash and burn. Not sure if this is an issue with
vibe.d or phobos)
More information about the Digitalmars-d-learn
mailing list