I want one contract to be able to copy fields from another.
contract Klendathu {
string public bugs;
function Klendathu(string _bugs) public {
bugs = _bugs;
}
}
contract RogerYoung {
string public bugs;
function getBugsFromKlendathu(Klendathu bigK) public {
bugs = bigK.bugs();
}
}
I get the error
TypeError: Type inaccessible dynamic type is not implicitly convertible to expected type string storage ref.
bugs = bigK.bugs();
^---------^
How do I copy a string
from one contract to another?