Vladimir Panteleev:

But the check seems very simple, and is easily circumvented. This compiles:

byte[] func() {
 byte[1024] buffer;
 auto p = buffer[0..3];
 return p;
}

I guess such bugs will be detected (in safe code only!) after the implementation of: http://wiki.dlang.org/DIP69 Currently we are implementing a kind of pre-phase: http://wiki.dlang.org/DIP25

And here I have asked for @safe to become the default (Walter seems not against this idea):
https://d.puremagic.com/issues/show_bug.cgi?id=13838

Bye,
bearophile

Reply via email to