blob: 6aa79a2db42fa2f57b1722555ac26cb1e6e48ae9 [file] [log] [blame]
/* REQUIRED_ARGS: -dip25
TEST_OUTPUT:
---
fail_compilation/test16228.d(22): Error: function type 'return int()' has 'return' but does not return any indirections
fail_compilation/test16228.d(23): Error: function test16228.S.foo static member has no 'this' to which 'return' can apply
---
*/
// https://issues.dlang.org/show_bug.cgi?id=16228
int* wrap ( return ref int input )
{
return &input;
}
struct S
{
int x;
int foo() return { return 3; }
static ref int foo() return { return x; }
}