Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/testscopestatic.d

raw
1
2 /* TEST_OUTPUT:
3 ---
4 fail_compilation/testscopestatic.d(15): Error: variable `testscopestatic.foo.p` cannot be `scope` and `static`
5 fail_compilation/testscopestatic.d(16): Error: variable `testscopestatic.foo.b` cannot be `scope` and `extern`
6 fail_compilation/testscopestatic.d(17): Error: variable `testscopestatic.foo.c` cannot be `scope` and `__gshared`
7 fail_compilation/testscopestatic.d(21): Error: field `x` cannot be `scope`
8 ---
9 */
10
11
12 void foo()
13 {
14 scope int a;
15 static scope int* p;
16 extern scope int b;
17 scope __gshared int c;
18
19 struct S
20 {
21 scope int x;
22 }
23 }