aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-09-18 18:31:55 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-09-19 02:49:27 +0800
commitff275e369c9f587d462481d49a7dec963d2f8d1d (patch)
tree87146c5350ff01ee9c3472a2c7d06e3dd31af4a7
parent3a9a9db6d688f3a1ef3bbcb0a378bbd14779abde (diff)
downloaddexon-solidity-ff275e369c9f587d462481d49a7dec963d2f8d1d.tar.gz
dexon-solidity-ff275e369c9f587d462481d49a7dec963d2f8d1d.tar.zst
dexon-solidity-ff275e369c9f587d462481d49a7dec963d2f8d1d.zip
Allow constant byte arrays.
-rw-r--r--Changelog.md1
-rw-r--r--libsolidity/analysis/TypeChecker.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/Changelog.md b/Changelog.md
index 20630383..f1b1a19c 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -18,6 +18,7 @@ Features:
Bugfixes:
* ABI JSON: Include all overloaded events.
* Parser: Crash fix related to parseTypeName.
+ * Type Checker: Allow constant byte arrays.
### 0.4.16 (2017-08-24)
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index 030c8f6b..40add37e 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -623,7 +623,7 @@ bool TypeChecker::visit(VariableDeclaration const& _variable)
{
bool allowed = false;
if (auto arrayType = dynamic_cast<ArrayType const*>(_variable.type().get()))
- allowed = arrayType->isString();
+ allowed = arrayType->isByteArray();
if (!allowed)
m_errorReporter.typeError(_variable.location(), "Constants of non-value type not yet implemented.");
}