Merge pull request #24 from LianaHus/sol_fix_error_check

added check for having type in VariableDeclaration::checkTypeRequirem…
This commit is contained in:
Gav Wood 2015-08-27 16:54:44 +02:00
commit 91cffa0d5d

View File

@ -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."));
}