aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/AST.cpp
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2015-08-24 18:34:44 +0800
committerLianaHus <liana@ethdev.com>2015-08-24 18:34:44 +0800
commitfed363263a6e9972add96b12be802a79096da744 (patch)
treee24f4b8b229c9fcfbb15f776a061ea726192d2d8 /libsolidity/AST.cpp
parent625be53252d6ef98a20b7e5abd3e675fcbc55c6b (diff)
downloaddexon-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.cpp2
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."));
}