aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-05-28 22:20:50 +0800
committerchriseth <c@ethdev.com>2015-05-28 22:20:50 +0800
commit6949ce97e43a7198180188209fe4a09ca9744f50 (patch)
treee714ef3967a3e87769a3b846d06f7a5b25fcbb25 /AST.cpp
parentf7e3568c6202b940394097f147e0c4e6ffe7fe9c (diff)
downloaddexon-solidity-6949ce97e43a7198180188209fe4a09ca9744f50.tar.gz
dexon-solidity-6949ce97e43a7198180188209fe4a09ca9744f50.tar.zst
dexon-solidity-6949ce97e43a7198180188209fe4a09ca9744f50.zip
Re-introduce string type.
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/AST.cpp b/AST.cpp
index 14884254..248abfdb 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -890,6 +890,8 @@ void IndexAccess::checkTypeRequirements(TypePointers const*)
ArrayType const& type = dynamic_cast<ArrayType const&>(*m_base->getType());
if (!m_index)
BOOST_THROW_EXCEPTION(createTypeError("Index expression cannot be omitted."));
+ if (type.isString())
+ BOOST_THROW_EXCEPTION(createTypeError("Index access for string is not possible."));
m_index->expectType(IntegerType(256));
if (type.isByteArray())
m_type = make_shared<FixedBytesType>(1);