This code works:
contract C {
function Get() constant returns(bytes8[]) {
bytes8[] stuff;
return stuff;
}
function Copy() {
bytes8[] memory stuff = Get();
}
}
But when I try to call Get()
in another way...
contract A {
A other;
function Get() constant returns(bytes8[]) {
bytes8[] stuff;
return stuff;
}
function Copy() {
bytes8[] stuff = other.Get();
}
}
I get this error:
DynamicType.sol:8:5: Error: Type inaccessible dynamic type is not implicitly convertible to expected type bytes8[] memory.
bytes8[] memory stuff = other.Get();
^---------------------------------^
I come from the Javascript world where we don't have to worry about storage vs memory types. I have read the section in the Solidity docs on Data Location but it would be helpful to get an explanation particular to this example so that I can better connect the concepts.