https://issues.dlang.org/show_bug.cgi?id=22539
--- Comment #3 from Dennis <[email protected]> --- (In reply to Walter Bright from comment #2) > I suspect the problem is actually this line: > > scope int*[1] x = [&stackVar]; > > Since scope is not transitive, allowing this causes the compiler to lose > track of stack addresses, and will allow escapes. Only if x were a slice, but since it's a static array with dimension 1 it is identical to: scope int* x = &stackVar; So it is correctly permitted. --
