blob: 6ee988a5dbb646a25ccb47c680635a29c1f5631a [file] [log] [blame]
/* REQUIRED_ARGS: -preview=dip1000
* TEST_OUTPUT:
---
fail_compilation/test17764.d(109): Error: scope variable `c` assigned to non-scope `global`
---
*/
// https://issues.dlang.org/show_bug.cgi?id=17764
#line 100
int** global;
struct S { int** str; }
void f() @safe
{
int* buf;
S[1] c = S(&buf);
global = c[0].str; /* This should be rejected. */
}