mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
30 lines
494 B
D
30 lines
494 B
D
/* REQUIRED_ARGS: -betterC
|
|
* TEST_OUTPUT:
|
|
---
|
|
fail_compilation/betterc.d(12): Error: cannot use `throw` statements with -betterC
|
|
fail_compilation/betterc.d(17): Error: cannot use try-catch statements with -betterC
|
|
fail_compilation/betterc.d(29): Error: `TypeInfo` cannot be used with -betterC
|
|
---
|
|
*/
|
|
|
|
void test()
|
|
{
|
|
throw new Exception("msg");
|
|
}
|
|
|
|
void test2()
|
|
{
|
|
try
|
|
{
|
|
test();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
}
|
|
}
|
|
|
|
void test3()
|
|
{
|
|
int i;
|
|
auto ti = typeid(i);
|
|
}
|