Debian Codegraph @

gcc/testsuite/gdc.test/compilable/sw_transition_field.d

raw
1 // PERMUTE_ARGS:
2 // REQUIRED_ARGS: -transition=field
3 /*
4 TEST_OUTPUT:
5 ---
6 compilable/sw_transition_field.d(15): `sw_transition_field.S1.ix` is `immutable` field
7 compilable/sw_transition_field.d(16): `sw_transition_field.S1.cx` is `const` field
8 compilable/sw_transition_field.d(21): `sw_transition_field.S2!(immutable(int)).S2.f` is `immutable` field
9 compilable/sw_transition_field.d(21): `sw_transition_field.S2!(const(int)).S2.f` is `const` field
10 ---
11 */
12
13 struct S1
14 {
15 immutable int ix = 1;
16 const int cx = 2;
17 }
18
19 struct S2(F)
20 {
21 F f = F.init;
22 }
23
24 alias S2!(immutable int) S2I;
25 alias S2!( const int) S2C;