mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add test for shadowing inline assembly instruction
This commit is contained in:
parent
900c56d996
commit
7ff44bec94
@ -1479,6 +1479,19 @@ BOOST_AUTO_TEST_CASE(function_type_state_variable)
|
|||||||
BOOST_CHECK(successParse(text));
|
BOOST_CHECK(successParse(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(inline_assembly_shadowed_instruction)
|
||||||
|
{
|
||||||
|
char const* text = R"(
|
||||||
|
contract A {
|
||||||
|
function f() {
|
||||||
|
assembly {
|
||||||
|
let gas := 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
CHECK_PARSE_ERROR(text, "Cannot shadow instructions with variable declaration.");
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE_END()
|
BOOST_AUTO_TEST_SUITE_END()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user