Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/staticassert_sema1.d

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/staticassert_sema1.d(17): Error: static assert: "unsupported OS"
5 ---
6 */
7
8 // https://issues.dlang.org/show_bug.cgi?id=24645
9 // Test that a static assert(0) is not drowned out by subsequent import errors.
10
11 version(_NONEXISTENT_OS)
12 {
13
14 }
15 else
16 {
17 static assert(0, msg);
18 }
19
20 import object: _NONEXISTENT;
21 import object: _NONEXISTENT;
22 import object: _NONEXISTENT;
23 import object: _NONEXISTENT;
24 import object: _NONEXISTENT;
25 import object: _NONEXISTENT;
26 import object: _NONEXISTENT;
27 import object: _NONEXISTENT;
28 import object: _NONEXISTENT;
29 import object: _NONEXISTENT;
30 import object: _NONEXISTENT;
31 import object: _NONEXISTENT;
32 import object: _NONEXISTENT;
33 import object: _NONEXISTENT;
34 import object: _NONEXISTENT;
35 import object: _NONEXISTENT;
36 import object: _NONEXISTENT;
37 import object: _NONEXISTENT;
38
39 enum msg = "unsupported OS";