www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - context pointer breaks getOverloads, shouldn't it be ignored by it?

void main()
{
     class Foo
     {
         void fun(){}
     }

     foreach(m; __traits(allMembers, Foo))
     foreach(sym; __traits(getOverloads, Foo, m))
     {
     }
}

this fails with:

onlineapp.d(9): Error: no property this for type 
onlineapp.main.Foo
onlineapp.d(9): Error: (Foo).this cannot be resolved

it works fine if i add a `static if(m != "this")` or 
alternatively use std.meta.Erase("this", __traits(allMembers, 
Foo)).
Mar 12 2018