blob: 9e0b9d4f083174046139b8e09a4c54e191bede31 [file] [log] [blame]
string result;
struct A
{
int[] a;
immutable(A) fun()
{
result ~= "Yo";
return immutable A([7]);
}
alias fun this;
}
void main()
{
A a;
immutable A b = a; // error: cannot implicitly convert expression a of type A to immutable(A)
assert(result == "Yo");
}