4 fail_compilation/fail118.d(45): Error: invalid `foreach` aggregate `Iter` of type `Iter`
5 fail_compilation/fail118.d(45): `foreach` works with input ranges (implementing `front` and `popFront`), aggregates implementing `opApply`, or the result of an aggregate's `.tupleof` property
6 fail_compilation/fail118.d(45): https://dlang.org/phobos/std_range_primitives.html#isInputRange
7 fail_compilation/fail118.d(46): Error: invalid `foreach` aggregate `Iter` of type `Iter`
8 fail_compilation/fail118.d(46): `foreach` works with input ranges (implementing `front` and `popFront`), aggregates implementing `opApply`, or the result of an aggregate's `.tupleof` property
9 fail_compilation/fail118.d(46): https://dlang.org/phobos/std_range_primitives.html#isInputRange
10 fail_compilation/fail118.d(49): Error: invalid `foreach` aggregate `s` of type `S*`
11 fail_compilation/fail118.d(51): Error: undefined identifier `unknown`
12 fail_compilation/fail118.d(39): Error: undefined identifier `doesNotExist`
13 fail_compilation/fail118.d(53): Error: template instance `fail118.error!()` error instantiating
14 fail_compilation/fail118.d(53): Error: invalid `foreach` aggregate `error()` of type `void`
18 // https://issues.dlang.org/show_bug.cgi?id=441
19 // Crash on foreach of mixed-in aggregate.
20 template opHackedApply()
29 mixin opHackedApply
!() oldIterMix
;
34 int opApply(scope int delegate(const int) dg
);
45 foreach (int i
; f
.oldIterMix
.Iter
) {}
46 foreach ( i
; f
.oldIterMix
.Iter
) {}
49 foreach (const i
; s
) {}
51 foreach(const i
; unknown
) {}
53 foreach (const i
; error()) {}