]>
Commit | Line | Data |
---|---|---|
844fa2de | 1 | // https://bugzilla.gdcproject.org/show_bug.cgi?id=242 |
72ddef62 | 2 | // { dg-do run } |
844fa2de IB |
3 | // { dg-skip-if "needs gcc/config.d" { ! d_runtime } } |
4 | ||
5 | struct S242 | |
6 | { | |
7 | enum M = S242(); | |
8 | int a = 42; | |
9 | ||
10 | auto iter() | |
11 | { | |
12 | this.a = 24; | |
13 | return this; | |
14 | } | |
15 | } | |
16 | ||
17 | S242 test242() | |
18 | { | |
19 | return S242.M.iter; | |
20 | } | |
21 | ||
22 | void main() | |
23 | { | |
24 | assert(test242() == S242(24)); | |
25 | } |