On Tuesday, 1 September 2020 at 18:57:30 UTC, Steven Schveighoffer wrote:
string overrideState(string s)
{
   // work your magic here, it's normal D code!
}

void foo(string s)()
{
   mixin(overrideState(s));
}

Unfortunately this won't work if there is a function 'bar' in different module that calls 'foo':

void bar()
{
   foo!"bar";
}

void foo(string s)()
{
  mixin(overrideState(s));

  ...
  mixin("bar()");     // just for illustration
}

Reply via email to