diff options
author | chriseth <chris@ethereum.org> | 2017-04-25 19:15:42 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-04-25 22:49:04 +0800 |
commit | 1d712c7d6490616846de4ec9569ca627e62ea2c1 (patch) | |
tree | f3036aaab6076f6248148db9be9f92aa540055ac /libsolidity/analysis | |
parent | e841b23bfd57607511d620ed34ef96188bbadec6 (diff) | |
download | dexon-solidity-1d712c7d6490616846de4ec9569ca627e62ea2c1.tar.gz dexon-solidity-1d712c7d6490616846de4ec9569ca627e62ea2c1.tar.zst dexon-solidity-1d712c7d6490616846de4ec9569ca627e62ea2c1.zip |
Fix storage access tests.
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index b07dbde1..08a49f51 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -655,6 +655,11 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly) return size_t(-1); } } + else if (var->isConstant()) + { + typeError(_identifier.location, "Constant variables not supported by inline assembly."); + return size_t(-1); + } else if (!var->isLocalVariable()) { typeError(_identifier.location, "Only local variables are supported. To access storage variables, use the _slot and _offset suffixes."); @@ -670,11 +675,6 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly) typeError(_identifier.location, "Only types that use one stack slot are supported."); return size_t(-1); } - else if (var->isConstant()) - { - typeError(_identifier.location, "Constant variables not supported by inline assembly."); - return size_t(-1); - } } else if (_context == assembly::IdentifierContext::LValue) { |