c++: fix explicit/copy problem [PR109247]
[official-gcc.git] / gcc / testsuite / gdc.dg / torture / gdc179.d
bloba64ca7d452a1ae1233952f0a4e841d12dbc75a7a
1 // https://bugzilla.gdcproject.org/show_bug.cgi?id=179
2 // { dg-do run }
3 // { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
5 import core.stdc.stdio;
7 struct S179a
9 @disable this(this);
12 struct S179b
14 S179a s1;
15 void connect() { printf("this=%p\n", &this); }
18 class C179
20 private S179b s2;
21 ref S179b value() @property
23 printf("this=%p\n", &s2);
24 return s2;
28 void main()
30 C179 a = new C179;
31 a.value.connect();