Review comments.

This commit is contained in:
chriseth
2017-04-25 16:49:03 +02:00
parent 83bf34c571
commit 34717838da
4 changed files with 41 additions and 2 deletions
@@ -5078,6 +5078,36 @@ BOOST_AUTO_TEST_CASE(inline_assembly_storage_in_modifiers)
CHECK_ERROR(text, DeclarationError, "Variable not found or variable not lvalue.");
}
BOOST_AUTO_TEST_CASE(inline_assembly_constant_assign)
{
char const* text = R"(
contract test {
uint constant x = 1;
function f() {
assembly {
x := 2
}
}
}
)";
CHECK_ERROR(text, DeclarationError, "Variable not found or variable not lvalue.");
}
BOOST_AUTO_TEST_CASE(inline_assembly_constant_access)
{
char const* text = R"(
contract test {
uint constant x = 1;
function f() {
assembly {
let y := x
}
}
}
)";
CHECK_ERROR(text, TypeError, "Constant variables not yet implemented for inline assembly");
}
BOOST_AUTO_TEST_CASE(invalid_mobile_type)
{
char const* text = R"(