diff options
author | Christian <c@ethdev.com> | 2015-02-13 01:38:07 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-02-13 03:19:49 +0800 |
commit | 1c3c1f1e5d366ba6d1da03ebaaf03d425037504b (patch) | |
tree | fa482ea80f72da63739baee40ca10965438bfcb4 /AST.cpp | |
parent | 0e40b21c56c352b7453303b116c4b16459af6ffe (diff) | |
download | dexon-solidity-1c3c1f1e5d366ba6d1da03ebaaf03d425037504b.tar.gz dexon-solidity-1c3c1f1e5d366ba6d1da03ebaaf03d425037504b.tar.zst dexon-solidity-1c3c1f1e5d366ba6d1da03ebaaf03d425037504b.zip |
Copying structs.
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -402,10 +402,8 @@ void Assignment::checkTypeRequirements() { m_leftHandSide->checkTypeRequirements(); m_leftHandSide->requireLValue(); - //@todo later, assignments to structs might be possible, but not to mappings - if (m_leftHandSide->getType()->getCategory() != Type::Category::ByteArray && - !m_leftHandSide->getType()->isValueType() && !m_leftHandSide->isLocalLValue()) - BOOST_THROW_EXCEPTION(createTypeError("Assignment to non-local non-value lvalue.")); + if (m_leftHandSide->getType()->getCategory() == Type::Category::Mapping) + BOOST_THROW_EXCEPTION(createTypeError("Mappings cannot be assigned to.")); m_type = m_leftHandSide->getType(); if (m_assigmentOperator == Token::Assign) m_rightHandSide->expectType(*m_type); |