]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gdc.dg/torture/gdc242b.d
d: Move all runnable tests in gdc.dg to gdc.dg/torture
[thirdparty/gcc.git] / gcc / testsuite / gdc.dg / torture / gdc242b.d
CommitLineData
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
5struct 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
17S242 test242()
18{
19 return S242.M.iter;
20}
21
22void main()
23{
24 assert(test242() == S242(24));
25}