diff options
author | chriseth <chris@ethereum.org> | 2017-02-20 22:20:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-20 22:20:12 +0800 |
commit | 32b7d17467abe02ebbd503e994092f718b92172f (patch) | |
tree | 932b523f9f470c52f211dd865549262fb3c342f5 /test/libsolidity | |
parent | 419ab9260ed817088f7e3b58a2ff01c47a3f7b9c (diff) | |
parent | c0961664f9666e5f4e8e35e80ef9a71426f6c394 (diff) | |
download | dexon-solidity-32b7d17467abe02ebbd503e994092f718b92172f.tar dexon-solidity-32b7d17467abe02ebbd503e994092f718b92172f.tar.gz dexon-solidity-32b7d17467abe02ebbd503e994092f718b92172f.tar.bz2 dexon-solidity-32b7d17467abe02ebbd503e994092f718b92172f.tar.lz dexon-solidity-32b7d17467abe02ebbd503e994092f718b92172f.tar.xz dexon-solidity-32b7d17467abe02ebbd503e994092f718b92172f.tar.zst dexon-solidity-32b7d17467abe02ebbd503e994092f718b92172f.zip |
Merge pull request #1705 from ethereum/fixasmbug
Bugfix: Deposit one stack item for non-value types in inline assembly type checking.
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 507d9057..a1ebc300 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -4852,6 +4852,19 @@ BOOST_AUTO_TEST_CASE(inline_assembly_unbalanced_negative_stack) CHECK_WARNING(text, "Inline assembly block is not balanced"); } +BOOST_AUTO_TEST_CASE(inline_assembly_unbalanced_two_stack_load) +{ + char const* text = R"( + contract c { + uint8 x; + function f() { + assembly { x pop } + } + } + )"; + CHECK_WARNING(text, "Inline assembly block is not balanced"); +} + BOOST_AUTO_TEST_CASE(inline_assembly_in_modifier) { char const* text = R"( |