]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/issue20627.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / issue20627.d
1 /**
2 REQUIRED_ARGS: -de
3 TEST_OUTPUT:
4 ---
5 fail_compilation/issue20627.d(38): Deprecation: `shared static` constructor can only be of D linkage
6 fail_compilation/issue20627.d(39): Deprecation: `shared static` destructor can only be of D linkage
7 fail_compilation/issue20627.d(40): Deprecation: `static` constructor can only be of D linkage
8 fail_compilation/issue20627.d(41): Deprecation: `static` destructor can only be of D linkage
9 fail_compilation/issue20627.d(55): Deprecation: `shared static` constructor can only be of D linkage
10 fail_compilation/issue20627.d(56): Deprecation: `shared static` destructor can only be of D linkage
11 fail_compilation/issue20627.d(57): Deprecation: `static` constructor can only be of D linkage
12 fail_compilation/issue20627.d(58): Deprecation: `static` destructor can only be of D linkage
13 fail_compilation/issue20627.d(63): Deprecation: `shared static` constructor can only be of D linkage
14 fail_compilation/issue20627.d(64): Deprecation: `shared static` destructor can only be of D linkage
15 fail_compilation/issue20627.d(65): Deprecation: `static` constructor can only be of D linkage
16 fail_compilation/issue20627.d(66): Deprecation: `static` destructor can only be of D linkage
17 ---
18 */
19
20 // OK, default linkage
21 shared static this () {}
22 shared static ~this () {}
23 static this () {}
24 static ~this () {}
25
26 // Still okay
27 extern(D)
28 {
29 shared static this () {}
30 shared static ~this () {}
31 static this () {}
32 static ~this () {}
33 }
34
35 // No!
36 extern(C)
37 {
38 shared static this () {}
39 shared static ~this () {}
40 static this () {}
41 static ~this () {}
42 }
43
44 // Disabled because platform specific
45 version (none) extern(Objective-C)
46 {
47 shared static this () {}
48 shared static ~this () {}
49 static this () {}
50 static ~this () {}
51 }
52
53 extern(C++)
54 {
55 shared static this () {}
56 shared static ~this () {}
57 static this () {}
58 static ~this () {}
59 }
60
61 extern(System)
62 {
63 shared static this () {}
64 shared static ~this () {}
65 static this () {}
66 static ~this () {}
67 }