blob: 479140979ec33c7014c93bb8f14b7f6653a25c4e [file] [log] [blame]
// https://issues.dlang.org/show_bug.cgi?id=21927
/*
TEST_OUTPUT:
---
fail_compilation/test21927.d(17): Error: invalid `foreach` aggregate `this.T2(Args2...)` of type `void`
fail_compilation/test21927.d(18): Error: invalid `foreach` aggregate `this.T2!()` of type `void`
---
*/
struct S
{
template T2(Args2...) {}
void fun()
{
// original test case
static foreach (p; this.T2) {} // ICE
static foreach (p; this.T2!()) {} // ICE
}
}