diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-01-25 18:37:33 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-01-25 19:28:09 +0800 |
commit | 7ff44bec94dd72acb73c2caa26786113c24c8360 (patch) | |
tree | f9c1e004c59902826a0cd5305b6b9eb1bc9c2549 /test/libsolidity/SolidityParser.cpp | |
parent | 900c56d996472cb2053b69c7104ef007c13b1e80 (diff) | |
download | dexon-solidity-7ff44bec94dd72acb73c2caa26786113c24c8360.tar.gz dexon-solidity-7ff44bec94dd72acb73c2caa26786113c24c8360.tar.zst dexon-solidity-7ff44bec94dd72acb73c2caa26786113c24c8360.zip |
Add test for shadowing inline assembly instruction
Diffstat (limited to 'test/libsolidity/SolidityParser.cpp')
-rw-r--r-- | test/libsolidity/SolidityParser.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index a3bfab75..22766358 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -1479,6 +1479,19 @@ BOOST_AUTO_TEST_CASE(function_type_state_variable) 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() |