mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
25 lines
421 B
D
25 lines
421 B
D
// REQUIRED_ARGS: -verrors=simple
|
|
/* TEST_OUTPUT:
|
|
---
|
|
compilable/test324.d(18): Deprecation: function `test324.main.doStuff!((i)
|
|
{
|
|
return i;
|
|
}
|
|
).doStuff` function requires a dual-context, which is deprecated
|
|
compilable/test324.d(24): instantiated from here: `doStuff!((i)
|
|
{
|
|
return i;
|
|
}
|
|
)`
|
|
---
|
|
*/
|
|
struct Foo
|
|
{
|
|
void doStuff(alias fun)() {}
|
|
}
|
|
|
|
void main()
|
|
{
|
|
Foo foo;
|
|
foo.doStuff!( (i) { return i; })();
|
|
}
|