| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/diag9357.d(14): Error: cannot implicitly convert expression `1.0` of type `double` to `int` |
| 5 |
fail_compilation/diag9357.d(15): Error: cannot implicitly convert expression `10.0` of type `double` to `int` |
| 6 |
fail_compilation/diag9357.d(16): Error: cannot implicitly convert expression `11.0` of type `double` to `int` |
| 7 |
fail_compilation/diag9357.d(17): Error: cannot implicitly convert expression `99.0` of type `double` to `int` |
| 8 |
fail_compilation/diag9357.d(18): Error: cannot implicitly convert expression `1.04858e+06L` of type `real` to `int` |
| 9 |
fail_compilation/diag9357.d(19): Error: cannot implicitly convert expression `1.04858e+06L` of type `real` to `int` |
| 10 |
--- |
| 11 |
*/ |
| 12 |
void main() |
| 13 |
{ |
| 14 |
{ int x = 1.0; } |
| 15 |
{ int x = 10.0; } |
| 16 |
{ int x = 11.0; } |
| 17 |
{ int x = 99.0; } |
| 18 |
{ int x = 1048575.0L; } |
| 19 |
{ int x = 1048576.0L; } |
| 20 |
} |