MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag16976.d
blob1dbacfd3e54a17149268b8454557af67189a3c3e
1 /* TEST_OUTPUT:
2 ---
3 fail_compilation/diag16976.d(44): Error: foreach: key cannot be of non-integral type `float`
4 fail_compilation/diag16976.d(45): Error: foreach: key cannot be of non-integral type `float`
5 fail_compilation/diag16976.d(46): Error: foreach: key cannot be of non-integral type `float`
6 fail_compilation/diag16976.d(47): Error: foreach: key cannot be of non-integral type `float`
7 fail_compilation/diag16976.d(48): Error: foreach: key cannot be of non-integral type `float`
8 fail_compilation/diag16976.d(49): Error: foreach: key cannot be of non-integral type `float`
9 fail_compilation/diag16976.d(50): Error: foreach: key cannot be of non-integral type `float`
10 fail_compilation/diag16976.d(51): Error: foreach: key cannot be of non-integral type `float`
11 fail_compilation/diag16976.d(52): Error: foreach: key cannot be of non-integral type `float`
12 fail_compilation/diag16976.d(53): Error: foreach: key cannot be of non-integral type `float`
13 fail_compilation/diag16976.d(54): Error: foreach: key cannot be of non-integral type `float`
14 fail_compilation/diag16976.d(55): Error: foreach: key cannot be of non-integral type `float`
15 fail_compilation/diag16976.d(56): Error: foreach: key cannot be of non-integral type `float`
16 fail_compilation/diag16976.d(57): Error: foreach: key cannot be of non-integral type `float`
17 fail_compilation/diag16976.d(58): Error: foreach: key cannot be of non-integral type `float`
18 fail_compilation/diag16976.d(59): Error: foreach: key cannot be of non-integral type `float`
19 fail_compilation/diag16976.d(65): Error: foreach: key cannot be of non-integral type `float`
20 fail_compilation/diag16976.d(66): Error: foreach: key cannot be of non-integral type `float`
21 fail_compilation/diag16976.d(67): Error: foreach: key cannot be of non-integral type `float`
22 fail_compilation/diag16976.d(68): Error: foreach: key cannot be of non-integral type `float`
23 fail_compilation/diag16976.d(69): Error: foreach: key cannot be of non-integral type `float`
24 fail_compilation/diag16976.d(70): Error: foreach: key cannot be of non-integral type `float`
25 fail_compilation/diag16976.d(71): Error: foreach: key cannot be of non-integral type `float`
26 fail_compilation/diag16976.d(72): Error: foreach: key cannot be of non-integral type `float`
27 fail_compilation/diag16976.d(73): Error: foreach: key cannot be of non-integral type `float`
28 fail_compilation/diag16976.d(74): Error: foreach: key cannot be of non-integral type `float`
29 fail_compilation/diag16976.d(75): Error: foreach: key cannot be of non-integral type `float`
30 fail_compilation/diag16976.d(76): Error: foreach: key cannot be of non-integral type `float`
31 fail_compilation/diag16976.d(77): Error: foreach: key cannot be of non-integral type `float`
32 fail_compilation/diag16976.d(78): Error: foreach: key cannot be of non-integral type `float`
33 fail_compilation/diag16976.d(79): Error: foreach: key cannot be of non-integral type `float`
34 fail_compilation/diag16976.d(80): Error: foreach: key cannot be of non-integral type `float`
35 ---
38 void main()
40 int[] dyn = [1,2,3,4,5];
41 int[5] sta = [1,2,3,4,5];
42 char[] str = ['1','2','3','4','5'];
43 char[5] chr = ['1','2','3','4','5'];
44 foreach(float f, i; dyn) {}
45 foreach(float f, i; sta) {}
46 foreach(float f, i; str) {}
47 foreach(float f, i; chr) {}
48 foreach(float f, dchar i; dyn) {}
49 foreach(float f, dchar i; sta) {}
50 foreach(float f, dchar i; str) {}
51 foreach(float f, dchar i; chr) {}
52 foreach_reverse(float f, i; dyn) {}
53 foreach_reverse(float f, i; sta) {}
54 foreach_reverse(float f, i; str) {}
55 foreach_reverse(float f, i; chr) {}
56 foreach_reverse(float f, dchar i; dyn) {}
57 foreach_reverse(float f, dchar i; sta) {}
58 foreach_reverse(float f, dchar i; str) {}
59 foreach_reverse(float f, dchar i; chr) {}
61 immutable int[] idyn = [1,2,3,4,5];
62 immutable int[5] ista = [1,2,3,4,5];
63 immutable char[] istr = ['1','2','3','4','5'];
64 immutable char[5] ichr = ['1','2','3','4','5'];
65 static foreach(float f, i; idyn) {}
66 static foreach(float f, i; ista) {}
67 static foreach(float f, i; istr) {}
68 static foreach(float f, i; ichr) {}
69 static foreach(float f, dchar i; idyn) {}
70 static foreach(float f, dchar i; ista) {}
71 static foreach(float f, dchar i; istr) {}
72 static foreach(float f, dchar i; ichr) {}
73 static foreach_reverse(float f, i; idyn) {}
74 static foreach_reverse(float f, i; ista) {}
75 static foreach_reverse(float f, i; istr) {}
76 static foreach_reverse(float f, i; ichr) {}
77 static foreach_reverse(float f, dchar i; idyn) {}
78 static foreach_reverse(float f, dchar i; ista) {}
79 static foreach_reverse(float f, dchar i; istr) {}
80 static foreach_reverse(float f, dchar i; ichr) {}