Make Array.get system function
.get() returns a memory block that can be changed if the original array is manipulated after getting the slice. So the slice returned by .get() may allow access to invalid memory.
This commit is contained in:
@ -136,7 +136,7 @@ import tanya.test.stub;
|
||||
}
|
||||
|
||||
// const constructor tests
|
||||
@nogc nothrow pure @safe unittest
|
||||
@nogc nothrow pure @system unittest
|
||||
{
|
||||
auto v1 = const Array!int([1, 2, 3]);
|
||||
auto v2 = Array!int(v1);
|
||||
|
Reference in New Issue
Block a user