Is this intended to work?

struct A
{
   __gshared static this()
   {
      //Add some reflection info to some global stuff.
      addReflectionInfo!(typeof(this));
   }
}

I just noticed this works in 2.069, is this intended? I mean I love it! It makes it possible to do lot's of useful mixins for runtime reflection for example. Just wondering if I can start writing code this way or if it's a regression and is going away. I think this did not work a year ago when I tried doing something like this.

Reply via email to