MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail261.d
blobd807dc8f3aa6b3d2dd5e7765a182b1dcd7e0edd3
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail261.d(20): Error: invalid `foreach` aggregate `range` of type `MyRange`
5 fail_compilation/fail261.d(20): `foreach` works with input ranges (implementing `front` and `popFront`), aggregates implementing `opApply`, or the result of an aggregate's `.tupleof` property
6 fail_compilation/fail261.d(20): https://dlang.org/phobos/std_range_primitives.html#isInputRange
7 ---
8 */
10 //import std.stdio;
12 struct MyRange
16 void main()
18 MyRange range;
20 foreach (r; range)
22 //writefln("%s", r.toString());