https://issues.dlang.org/show_bug.cgi?id=22916
Walter Bright <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Walter Bright <[email protected]> --- Here's the problem: ref int* index() return scope { return *ptr; } The `scope` applies to the `this` reference, in this case, `ptr`. Although the *ptr is not `scope`, because `scope` is not transitive, the compiler transfers the `scope` to the return value because it is told to. (This is a feature, not a bug.) --
