On Tuesday, 23 January 2018 at 22:52:47 UTC, Steven Schveighoffer wrote:


void main()
    auto s = S();
    auto t = T!s();
struct S { void fun(){} }
struct T(alias s){ static fun() { s.fun; } }

Fails in 2.078.

I don't know the reason. You would think that accessing s would be relative to T.fun's stack frame, and have nothing to do with an instance of T.

Right. This was the intention.

I would file a bug, and see what the compiler devs say.

ok, thanks.

Reply via email to