https://issues.dlang.org/show_bug.cgi?id=19519
--- Comment #2 from Илья Ярошенко <[email protected]> --- Reduced test case: private enum maxMsgLen = 1; class C { private char[maxMsgLen] _payload = void; } void initilizePayload(ref return char[maxMsgLen] payload, scope const(char)[] msg) { payload[0 .. msg.length] = msg; } /// unittest { bool func() { /// scope messages are copied auto m = new C(); initilizePayload(m._payload, "msg"); return __ctfe; } static assert(func() == 1); } =========== onlineapp.d(12): Error: cannot determine length of C([__void])._payload at compile time onlineapp.d(22): called from here: initilizePayload(m._payload, "msg") onlineapp.d(26): called from here: func() onlineapp.d(26): while evaluating: static assert(cast(int)func() == 1) --
