MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test21259.d
blob31dba3d52ca944bbb721f4daa96696965ddbe9e9
1 // https://issues.dlang.org/show_bug.cgi?id=21259
2 // REQUIRED_ARGS: -de
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/test21259.d(39): Deprecation: alias `test21259.Foo.width` is deprecated
7 fail_compilation/test21259.d(40): Deprecation: alias `test21259.Foo2.width` is deprecated
8 fail_compilation/test21259.d(41): Deprecation: variable `test21259.Foo3.bar` is deprecated
9 fail_compilation/test21259.d(42): Deprecation: alias `test21259.Foo4.width` is deprecated
10 ---
13 struct Foo
15 int bar;
16 deprecated alias width = bar;
19 struct Foo2
21 deprecated int bar;
22 deprecated alias width = bar;
25 struct Foo3
27 deprecated int bar;
30 struct Foo4
32 int bar;
33 deprecated:
34 alias width = bar;
37 void main()
39 Foo a = { width : 100};
40 Foo2 b = { width : 100};
41 Foo3 c = { bar : 100};
42 Foo4 d = { width : 100};
45 // deprecations inside a deprecated scope shouldn't be triggered
46 deprecated void test()
48 Foo a = { width : 100};
49 Foo2 b = { width : 100};
50 Foo3 c = { bar : 100};
51 Foo4 d = { width : 100};