[Issue 20505] [DIP1000] Static array allows to escape references to stack variables
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 21 07:05:35 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20505
--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> ---
This is illustrated by the following code:
@safe void bar() {
char[128] a;
char[][2] arr = [a, a];
char[][] a2 = arr; // should be error
return a2[0]; // oops
}
--
More information about the Digitalmars-d-bugs
mailing list