import std.stdio;
struct S
{
this(this)
{
writeln("this");
}
S opAssign(S s)
{
writeln("opAssign");
return s;
}
}
ref S func(ref S s)
{
return s;
}
void main()
{
S a;
writeln("-1-");
S b = a;
writeln("-2-");
b = a;
writeln("-3-");
b = func(a);
}
aW1wb3J0IHN0ZC5zdGRpbzsKCnN0cnVjdCBTCnsKCXRoaXModGhpcykKCXsKCQl3cml0ZWxuKCJ0aGlzIik7Cgl9CgoJUyBvcEFzc2lnbihTIHMpCgl7CgkJd3JpdGVsbigib3BBc3NpZ24iKTsKCQlyZXR1cm4gczsKCX0KfQoKcmVmIFMgZnVuYyhyZWYgUyBzKQp7CglyZXR1cm4gczsKfQoKdm9pZCBtYWluKCkKewoJUyBhOwoJd3JpdGVsbigiLTEtIik7CglTIGIgPSBhOwoJd3JpdGVsbigiLTItIik7CgliID0gYTsKCXdyaXRlbG4oIi0zLSIpOwoJYiA9IGZ1bmMoYSk7Cn0=