]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/fail18994.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail18994.d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail18994.d(19): Error: struct `fail18994.Type1` is not copyable because it has a disabled postblit
5 ---
6 */
7 struct Type2
8 {
9 int opApply(int delegate(ref Type1)) { return 0; }
10 }
11
12 struct Type1
13 {
14 @disable this(this);
15 }
16
17 void test()
18 {
19 foreach(b; Type2()) {}
20 }