diff options
author | LianaHus <liana@ethdev.com> | 2015-08-24 18:34:44 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-08-24 18:34:44 +0800 |
commit | fed363263a6e9972add96b12be802a79096da744 (patch) | |
tree | e24f4b8b229c9fcfbb15f776a061ea726192d2d8 /libsolidity/AST.cpp | |
parent | 625be53252d6ef98a20b7e5abd3e675fcbc55c6b (diff) | |
download | dexon-solidity-fed363263a6e9972add96b12be802a79096da744.tar dexon-solidity-fed363263a6e9972add96b12be802a79096da744.tar.gz dexon-solidity-fed363263a6e9972add96b12be802a79096da744.tar.bz2 dexon-solidity-fed363263a6e9972add96b12be802a79096da744.tar.lz dexon-solidity-fed363263a6e9972add96b12be802a79096da744.tar.xz dexon-solidity-fed363263a6e9972add96b12be802a79096da744.tar.zst dexon-solidity-fed363263a6e9972add96b12be802a79096da744.zip |
added check for having type in VariableDeclaration::checkTypeRequirements()
Diffstat (limited to 'libsolidity/AST.cpp')
-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.")); } |