| 1 |
// https://issues.dlang.org/show_bug.cgi?id=10599 |
| 2 |
// ICE(interpret.c) |
| 3 |
/* |
| 4 |
TEST_OUTPUT: |
| 5 |
--- |
| 6 |
fail_compilation/ice10599.d(13): Error: cannot implicitly convert expression `3.45` of type `double` to `int` |
| 7 |
fail_compilation/ice10599.d(21): called from here: `bug10599()` |
| 8 |
fail_compilation/ice10599.d(21): while evaluating: `static assert(bug10599())` |
| 9 |
--- |
| 10 |
*/ |
| 11 |
|
| 12 |
struct Bug { |
| 13 |
int val = 3.45; |
| 14 |
} |
| 15 |
int bug10599() |
| 16 |
{ |
| 17 |
Bug p = Bug(); |
| 18 |
return 1; |
| 19 |
} |
| 20 |
|
| 21 |
static assert(bug10599()); |