MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail13577.d
blob79f9068c759317a147d57ecbb15e98c3dab598e5
1 // https://issues.dlang.org/show_bug.cgi?id=13577
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/fail13577.d(27): Error: cannot implicilty convert range element of type `int[]` to variable `x` of type `immutable(int[])`
7 ---
8 */
10 struct Tuple(Types...)
12 Types items;
13 alias items this;
16 struct Range(T)
18 T[] arr;
19 alias ElemType = Tuple!(int, T);
20 ElemType front() { return typeof(return)(0, arr[0]); }
21 bool empty() { return false; }
22 void popFront() {}
25 void main()
27 foreach (immutable i, immutable x; Range!(int[])()) {} // Error