d: Merge upstream dmd, druntime 26f049fb26, phobos 330d6a4fd.
[official-gcc.git] / gcc / testsuite / gdc.test / compilable / testdip1008.d
blob54d404c993f89992ef241fdc9213fe1b4e8e86fe
1 // PERMUTE_ARGS:
2 // REQUIRED_ARGS: -preview=dip1008
4 int bar()
6 try
8 throw new Exception("message");
10 catch (Exception e)
12 return 7;
16 void throwQualifiers() @safe @nogc pure
18 throw new Exception("baz");
21 bool testThrowQualifiers()
23 try
25 throwQualifiers();
26 } catch (Exception e)
28 return true;
31 return false;
34 void foo()
36 enum r = bar();
37 static assert(r == 7);
39 static assert(testThrowQualifiers());