Merge pull request #4790 from ethereum/fixCalldata

Fix data location of external reference parameters.
This commit is contained in:
chriseth 2018-08-09 19:40:15 +02:00 committed by GitHub
commit 6954f83a0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -344,7 +344,7 @@ void ReferencesResolver::endVisit(VariableDeclaration const& _variable)
"(remove the \"memory\" or \"storage\" keyword)."
);
}
if (varLoc == Location::Default)
if (varLoc == Location::Default || varLoc == Location::CallData)
typeLoc = DataLocation::CallData;
else
typeLoc = varLoc == Location::Memory ? DataLocation::Memory : DataLocation::Storage;