https://issues.dlang.org/show_bug.cgi?id=14653
--- Comment #6 from Ketmar Dark <[email protected]> --- generated initializer for `alias this` variant: init: __r87 = (Wrapper __tmpfordtor86 = wrapit(); , __tmpfordtor86).rng; generated initializer for proxy variant: init: __r86 = wrapit(); clearly, compiler tries to pull `rng` away of wrapper struct with `alias this` redirection, and then destroying created wrapper. this may work for other cases, but completely wrong for `scoped`. seems that `foreach` conversion code shouldn't try to pull off aliased entity. --
