| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/fail27.d(15): Error: cannot implicitly convert expression `-32769` of type `int` to `short` |
| 5 |
fail_compilation/fail27.d(16): Error: cannot implicitly convert expression `-129` of type `int` to `byte` |
| 6 |
fail_compilation/fail27.d(17): Error: cannot implicitly convert expression `-1` of type `int` to `char` |
| 7 |
fail_compilation/fail27.d(18): Error: cannot implicitly convert expression `65536` of type `int` to `wchar` |
| 8 |
fail_compilation/fail27.d(19): Error: cannot implicitly convert expression `-1` of type `int` to `wchar` |
| 9 |
fail_compilation/fail27.d(21): Error: cannot implicitly convert expression `-1` of type `int` to `dchar` |
| 10 |
--- |
| 11 |
*/ |
| 12 |
|
| 13 |
void main() |
| 14 |
{ |
| 15 |
short a = -32769; // short.min-1 |
| 16 |
byte b = -129; // byte.min-1 |
| 17 |
char c = -1; // char.min-1 |
| 18 |
wchar D = 65536; // wchar.max+1 |
| 19 |
wchar d = -1; // wchar.min-1 |
| 20 |
dchar E = 1114111; // dchar.max+1 |
| 21 |
dchar e = -1; // dchar.min-1 |
| 22 |
} |