diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-13 23:02:10 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-14 04:47:35 +0800 |
commit | 4229caaadc1767571806a11ea431c5cf389081ac (patch) | |
tree | cb96bf31298c1fd0c77ee9ab41299b23cfe52475 /libsolidity/analysis | |
parent | e640bb2aed399fa920e35d42573f625fc139dcce (diff) | |
download | dexon-solidity-4229caaadc1767571806a11ea431c5cf389081ac.tar dexon-solidity-4229caaadc1767571806a11ea431c5cf389081ac.tar.gz dexon-solidity-4229caaadc1767571806a11ea431c5cf389081ac.tar.bz2 dexon-solidity-4229caaadc1767571806a11ea431c5cf389081ac.tar.lz dexon-solidity-4229caaadc1767571806a11ea431c5cf389081ac.tar.xz dexon-solidity-4229caaadc1767571806a11ea431c5cf389081ac.tar.zst dexon-solidity-4229caaadc1767571806a11ea431c5cf389081ac.zip |
Disable large arrays for memory location too
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index 56f9c764..29db7441 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -586,7 +586,11 @@ bool TypeChecker::visit(VariableDeclaration const& _variable) if (varType->category() == Type::Category::Array) if (auto arrayType = dynamic_cast<ArrayType const*>(varType.get())) - if ((arrayType->location() == DataLocation::CallData) && !arrayType->validForCalldata()) + if ( + ((arrayType->location() == DataLocation::Memory) || + (arrayType->location() == DataLocation::CallData)) && + !arrayType->validForCalldata() + ) m_errorReporter.typeError(_variable.location(), "Array is too large to be encoded as calldata."); return false; |