Debian Codegraph @

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

raw
1 /* REQUIRED_ARGS: -betterC
2 * TEST_OUTPUT:
3 ---
4 fail_compilation/betterc.d(12): Error: cannot use `throw` statements with -betterC
5 fail_compilation/betterc.d(17): Error: cannot use try-catch statements with -betterC
6 fail_compilation/betterc.d(29): Error: `TypeInfo` cannot be used with -betterC
7 ---
8 */
9
10 void test()
11 {
12 throw new Exception("msg");
13 }
14
15 void test2()
16 {
17 try
18 {
19 test();
20 }
21 catch (Exception e)
22 {
23 }
24 }
25
26 void test3()
27 {
28 int i;
29 auto ti = typeid(i);
30 }