diff options
author | Gav Wood <g@ethdev.com> | 2015-08-27 22:54:44 +0800 |
---|---|---|
committer | Gav Wood <g@ethdev.com> | 2015-08-27 22:54:44 +0800 |
commit | 91cffa0d5dbcc44b5f4bebe95f331453f23d768c (patch) | |
tree | a15fb888315445791fa222de1b5cddb24c7a5127 | |
parent | edebae09c13f871f896cb239f0a7aefe39786ee6 (diff) | |
parent | fed363263a6e9972add96b12be802a79096da744 (diff) | |
download | dexon-solidity-91cffa0d5dbcc44b5f4bebe95f331453f23d768c.tar.gz dexon-solidity-91cffa0d5dbcc44b5f4bebe95f331453f23d768c.tar.zst dexon-solidity-91cffa0d5dbcc44b5f4bebe95f331453f23d768c.zip |
Merge pull request #24 from LianaHus/sol_fix_error_check
added check for having type in VariableDeclaration::checkTypeRequirem…
-rw-r--r-- | libsolidity/AST.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libsolidity/AST.cpp b/libsolidity/AST.cpp index f7c84ccb..a849535a 100644 --- a/libsolidity/AST.cpp +++ b/libsolidity/AST.cpp @@ -556,7 +556,7 @@ void VariableDeclaration::checkTypeRequirements() BOOST_THROW_EXCEPTION(createTypeError("Illegal use of \"constant\" specifier.")); if (!m_value) BOOST_THROW_EXCEPTION(createTypeError("Uninitialized \"constant\" variable.")); - else if (!m_type->isValueType()) + else if (m_type && !m_type->isValueType()) // TODO: const is implemented only for uint, bytesXX and enums types. BOOST_THROW_EXCEPTION(createTypeError("Illegal use of \"constant\" specifier. \"constant\" is not implemented for this type yet.")); } |