diff options
Diffstat (limited to 'libsolidity/analysis/TypeChecker.cpp')
-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) { |