d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / deprecateopdot.d
blob46c949376e3506a601ade7388b4f9d9bde1bc082
1 /*
2 REQUIRED_ARGS: -de
3 TEST_OUTPUT:
4 ---
5 fail_compilation/deprecateopdot.d(27): Error: `opDot` is obsolete. Use `alias this`
6 fail_compilation/deprecateopdot.d(28): Error: `opDot` is obsolete. Use `alias this`
7 fail_compilation/deprecateopdot.d(29): Error: `opDot` is obsolete. Use `alias this`
8 ---
9 */
10 struct S6
12 int a, b;
14 struct T6
16 S6 s;
18 S6* opDot() return
20 return &s;
24 void test6()
26 T6 t;
27 t.a = 4;
28 assert(t.a == 4);
29 t.b = 5;