mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
20 lines
474 B
D
20 lines
474 B
D
// 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
|
|
}
|
|
}
|