mutable destructor? WAT???

Dicebot via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Aug 29 12:00:24 PDT 2016


And this segfaults (on Linux):

void main() @safe
{
      auto s = const(S)("abcd");
      foo(s);
}

I'd call it a clear bug. Most obvious fix would be to require 
const destructor if non-default destructor is present AND 
immutable/const instance is attempted to be created.


More information about the Digitalmars-d-learn mailing list