| 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); |
| 10 |
|
| 11 |
int example(int i) |
| 12 |
{ |
| 13 |
int x = cast(string)square(i); |
| 14 |
int y = cast(real function(char))assert(0); |
| 15 |
return x + y; |
| 16 |
} |