aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-02-13 01:38:07 +0800
committerChristian <c@ethdev.com>2015-02-13 03:19:49 +0800
commit1c3c1f1e5d366ba6d1da03ebaaf03d425037504b (patch)
treefa482ea80f72da63739baee40ca10965438bfcb4 /AST.cpp
parent0e40b21c56c352b7453303b116c4b16459af6ffe (diff)
downloaddexon-solidity-1c3c1f1e5d366ba6d1da03ebaaf03d425037504b.tar.gz
dexon-solidity-1c3c1f1e5d366ba6d1da03ebaaf03d425037504b.tar.zst
dexon-solidity-1c3c1f1e5d366ba6d1da03ebaaf03d425037504b.zip
Copying structs.
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/AST.cpp b/AST.cpp
index 33cf8c12..3c6b6007 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -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);