d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / betterc.d
blob6f4fb036b7f076d5629844a9b16ad9ecd0b45ff7
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 */
10 void test()
12 throw new Exception("msg");
15 void test2()
17 try
19 test();
21 catch (Exception e)
26 void test3()
28 int i;
29 auto ti = typeid(i);