mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
20 lines
254 B
D
20 lines
254 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail249.d(16): Error: invalid `foreach` aggregate `bar()` of type `void`
|
|
---
|
|
*/
|
|
|
|
module main;
|
|
|
|
public void bar()
|
|
{
|
|
}
|
|
|
|
void main()
|
|
{
|
|
foreach (Object o; bar())
|
|
{
|
|
debug Object foo = null; //error
|
|
}
|
|
}
|