Allow constant byte arrays.

This commit is contained in:
chriseth 2017-09-18 12:31:55 +02:00 committed by Alex Beregszaszi
parent 3a9a9db6d6
commit ff275e369c
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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.");
}