dmd/compiler/test/compilable/test324.d
Royal Simpson Pinto 45e4a09a3e
feat(errors): enable verrors=context globally (#20576)
Signed-off-by: royalpinto007 <royalpinto007@gmail.com>
2025-01-03 05:17:59 +08:00

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; })();
}