[Issue 14653] scoped!range in foreach crashes
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Wed Jun 17 06:26:38 PDT 2015
    
    
  
https://issues.dlang.org/show_bug.cgi?id=14653
--- Comment #6 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
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.
--
    
    
More information about the Digitalmars-d-bugs
mailing list