Fix storage access tests.

This commit is contained in:
chriseth
2017-04-25 16:49:04 +02:00
parent e841b23bfd
commit 1d712c7d64
3 changed files with 26 additions and 20 deletions
+5 -5
View File
@@ -655,6 +655,11 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly)
return size_t(-1);
}
}
else if (var->isConstant())
{
typeError(_identifier.location, "Constant variables not supported by inline assembly.");
return size_t(-1);
}
else if (!var->isLocalVariable())
{
typeError(_identifier.location, "Only local variables are supported. To access storage variables, use the _slot and _offset suffixes.");
@@ -670,11 +675,6 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly)
typeError(_identifier.location, "Only types that use one stack slot are supported.");
return size_t(-1);
}
else if (var->isConstant())
{
typeError(_identifier.location, "Constant variables not supported by inline assembly.");
return size_t(-1);
}
}
else if (_context == assembly::IdentifierContext::LValue)
{