struct ValueImpl { static immutable(int) getValue() { return 42; } } struct ValueUser { ValueImpl m_valueImpl; alias m_valueImpl this; } void main(string[] args) { static assert(ValueUser.getValue() == 42); // #1 } Line #1 doesn't compile. Error: variable m_valueImpl cannot be read at compile time
https://github.com/D-Programming-Language/dmd/pull/971