Debian Codegraph @

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

raw
1 /*
2 REQUIRED_ARGS: -de
3 TEST_OUTPUT:
4 ---
5 fail_compilation/array_bool.d(13): Deprecation: assert condition cannot be a string literal
6 fail_compilation/array_bool.d(13): If intentional, use `"foo" !is null` instead to preserve behaviour
7 fail_compilation/array_bool.d(14): Deprecation: static assert condition cannot be a string literal
8 fail_compilation/array_bool.d(14): If intentional, use `"foo" !is null` instead to preserve behaviour
9 ---
10 */
11 void main()
12 {
13 assert("foo");
14 static assert("foo");
15
16 assert("foo".ptr); // OK
17 static assert("foo".ptr); // OK
18
19 enum e = "bar";
20 static assert(e); // OK
21 assert(e); // OK
22 }