Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gdc.test/fail_compilation/diag9358.d @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 1830386684a0 |
children |
rev | line source |
---|---|
145 | 1 /* |
2 TEST_OUTPUT: | |
3 --- | |
4 fail_compilation/diag9358.d(12): Error: `x` must be of integral or string type, it is a `double` | |
5 fail_compilation/diag9358.d(14): Error: case must be a string or an integral constant, not `1.1` | |
6 fail_compilation/diag9358.d(15): Error: case must be a string or an integral constant, not `2.1` | |
7 --- | |
8 */ | |
9 void main() | |
10 { | |
11 double x; | |
12 switch (x) | |
13 { | |
14 case 1.1: break; | |
15 case 2.1: break; | |
16 default: | |
17 } | |
18 } |