MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / bug8150a.d
blobfab12c20b84157138e2b456aeeb37d3918b10002
1 // https://issues.dlang.org/show_bug.cgi?id=8150: nothrow check doesn't work for constructor
2 /*
3 TEST_OUTPUT:
4 ---
5 fail_compilation/bug8150a.d(14): Error: `object.Exception` is thrown but not caught
6 fail_compilation/bug8150a.d(12): Error: constructor `bug8150a.Foo.this` may throw but is marked as `nothrow`
7 ---
8 */
10 struct Foo
12 this(int) nothrow
14 throw new Exception("something");
18 void main() {
19 Foo(1);