mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
19 lines
471 B
D
19 lines
471 B
D
/* REQUIRED_ARGS: -preview=rvaluerefparam
|
|
*/
|
|
|
|
struct AS
|
|
{
|
|
string get() @safe @nogc pure nothrow { return _s; }
|
|
alias get this;
|
|
@disable this(this);
|
|
string _s;
|
|
}
|
|
|
|
void popFront(ref string) { }
|
|
static assert(!is(typeof((R r) => r.popFront)));
|
|
|
|
// https://issues.dlang.org/show_bug.cgi?id=24883
|
|
int toString(Writer)(ref Writer sink) => 3;
|
|
int toString(void delegate(scope const(char)[]) sink) => 4;
|
|
void put() {}
|
|
static assert(toString(dst => put()) == 4);
|