From ff275e369c9f587d462481d49a7dec963d2f8d1d Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 18 Sep 2017 12:31:55 +0200 Subject: [PATCH] Allow constant byte arrays. --- Changelog.md | 1 + libsolidity/analysis/TypeChecker.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 206303839..f1b1a19cf 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 030c8f6be..40add37ee 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(_variable.type().get())) - allowed = arrayType->isString(); + allowed = arrayType->isByteArray(); if (!allowed) m_errorReporter.typeError(_variable.location(), "Constants of non-value type not yet implemented."); }