mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
added check for having type in VariableDeclaration::checkTypeRequirements()
This commit is contained in:
parent
625be53252
commit
fed363263a
@ -556,7 +556,7 @@ void VariableDeclaration::checkTypeRequirements()
|
|||||||
BOOST_THROW_EXCEPTION(createTypeError("Illegal use of \"constant\" specifier."));
|
BOOST_THROW_EXCEPTION(createTypeError("Illegal use of \"constant\" specifier."));
|
||||||
if (!m_value)
|
if (!m_value)
|
||||||
BOOST_THROW_EXCEPTION(createTypeError("Uninitialized \"constant\" variable."));
|
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.
|
// 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."));
|
BOOST_THROW_EXCEPTION(createTypeError("Illegal use of \"constant\" specifier. \"constant\" is not implemented for this type yet."));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user