MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail23591.d
blobddfc5587c64174983768cf5a6730bb08e232932b
1 // https://issues.dlang.org/show_bug.cgi?id=23591
2 /*
3 TEST_OUTPUT:
4 ---
5 fail_compilation/fail23591.d(13): Error: cannot implicitly convert expression `square(i) , null` of type `string` to `int`
6 fail_compilation/fail23591.d(14): Error: cannot implicitly convert expression `assert(0) , null` of type `real function(char)` to `int`
7 ---
8 */
9 noreturn square(int x);
11 int example(int i)
13 int x = cast(string)square(i);
14 int y = cast(real function(char))assert(0);
15 return x + y;