MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test21443.d
blob2d99524da3521ead3af179230d43e03317bd3daf
1 // https://issues.dlang.org/show_bug.cgi?id=21443
2 // REQUIRED_ARGS: -de
4 /*
5 TEST_OUTPUT:
6 ---
7 fail_compilation/test21443.d(14): Deprecation: `return` statements cannot be in `scope(failure)` bodies.
8 fail_compilation/test21443.d(14): Use try-catch blocks for this purpose
9 ---
12 ulong get () @safe nothrow
14 scope (failure) return 10;
15 throw new Error("");
18 void main () @safe
20 assert(get() == 10); // passes