[Issue 12941] Everything should be @unsafe by default, and explicitly vetted (and documented) as @safe
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jun 19 16:11:36 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12941
--- Comment #6 from hsteoh at quickfur.ath.cx ---
Also, slicing of static arrays should be considered @system, because unless we
implement scope properly, they will break @safe-ty.
class C {
int[] data;
this(int[] _data) {
data = _data;
}
}
void func() {
int[4] arr = [1,2,3,4];
return new C(arr[]); // oops
}
--
More information about the Digitalmars-d-bugs
mailing list