import std.stdio;
struct S
{
this(this)
{
writeln("this");
}
ref S opAssign(ref 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-");
S c = func(a);
writeln("-4-");
c = func(a);
}
aW1wb3J0IHN0ZC5zdGRpbzsKCnN0cnVjdCBTCnsKCXRoaXModGhpcykKCXsKCQl3cml0ZWxuKCJ0aGlzIik7Cgl9CgoJcmVmIFMgb3BBc3NpZ24ocmVmIFMgcykKCXsKCQl3cml0ZWxuKCJvcEFzc2lnbiIpOwoJCXJldHVybiBzOwoJfQp9CgpyZWYgUyBmdW5jKHJlZiBTIHMpCnsKCXJldHVybiBzOwp9Cgp2b2lkIG1haW4oKQp7CglTIGE7Cgl3cml0ZWxuKCItMS0iKTsKCVMgYiA9IGE7Cgl3cml0ZWxuKCItMi0iKTsKCWIgPSBhOwoJd3JpdGVsbigiLTMtIik7CglTIGMgPSBmdW5jKGEpOwoJd3JpdGVsbigiLTQtIik7CgljID0gZnVuYyhhKTsKfQ==