std.exception: Fix a -dip1000 compilable issue

This commit is contained in:
carblue 2018-03-22 11:29:17 +01:00
parent a57eccffa3
commit 6551839aa3
2 changed files with 3 additions and 2 deletions

View file

@ -1231,9 +1231,10 @@ bool mayPointTo(S, T)(auto ref const shared S source, ref const shared T target)
@system unittest
{
int i;
int* p = &i; // trick the compiler when initializing slicep; https://issues.dlang.org/show_bug.cgi?id=18637
int[] slice = [0, 1, 2, 3, 4];
int[5] arr = [0, 1, 2, 3, 4];
int*[] slicep = [&i];
int*[] slicep = [p];
int*[1] arrp = [&i];
// A slice points to all of its members: