diff options
author | chriseth <c@ethdev.com> | 2015-05-28 22:20:50 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-05-28 22:20:50 +0800 |
commit | 6949ce97e43a7198180188209fe4a09ca9744f50 (patch) | |
tree | e714ef3967a3e87769a3b846d06f7a5b25fcbb25 /AST.cpp | |
parent | f7e3568c6202b940394097f147e0c4e6ffe7fe9c (diff) | |
download | dexon-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.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |