]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gdc.test/fail_compilation/diag9358.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag9358.d
CommitLineData
b4c522fa
IB
1/*
2TEST_OUTPUT:
3---
4fail_compilation/diag9358.d(12): Error: `x` must be of integral or string type, it is a `double`
5fee5ec3
IB
5fail_compilation/diag9358.d(14): Error: `case` must be a `string` or an integral constant, not `1.1`
6fail_compilation/diag9358.d(15): Error: `case` must be a `string` or an integral constant, not `2.1`
b4c522fa
IB
7---
8*/
9void main()
10{
11 double x;
12 switch (x)
13 {
14 case 1.1: break;
15 case 2.1: break;
16 default:
17 }
18}