mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
24 lines
403 B
D
24 lines
403 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail99.d(13): Error: delegate `dg` is not callable using argument types `()`
|
|
fail_compilation/fail99.d(13): too few arguments, expected 1, got 0
|
|
---
|
|
*/
|
|
|
|
//import std.stdio;
|
|
|
|
void foo(void delegate(int) dg)
|
|
{
|
|
dg();
|
|
//writefln("%s", dg(3));
|
|
}
|
|
|
|
void main()
|
|
{
|
|
foo(delegate(int i)
|
|
{
|
|
//writefln("i = %d\n", i);
|
|
}
|
|
);
|
|
}
|