Error: cannot implicitly convert expression this.aa of type inout(string[string]) to string[string]

Robert-D robert_d at gmail.com
Thu Mar 15 11:18:48 UTC 2018


struct S {
string[string] aa;

     S dup() inout pure {
     	return S(aa);
     }
}

void main() {
	auto s = S(["": ""]);
     s.dup();
}

Result:
  Error: cannot implicitly convert expression this.aa of type 
inout(string[string]) to string[string]


I need help with the above program.


More information about the Digitalmars-d-learn mailing list