diff options
author | Christian <c@ethdev.com> | 2014-12-19 00:04:20 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-12-19 00:19:42 +0800 |
commit | f35ee00ca29873b3e51ce0bfbbf934e8ea03e92c (patch) | |
tree | ca298fae9c8e53f7c039943ef804fcf0fd3df645 | |
parent | 5dbe2f198c32c67cb0b714edf1c55fafda5c4ca2 (diff) | |
download | dexon-solidity-f35ee00ca29873b3e51ce0bfbbf934e8ea03e92c.tar dexon-solidity-f35ee00ca29873b3e51ce0bfbbf934e8ea03e92c.tar.gz dexon-solidity-f35ee00ca29873b3e51ce0bfbbf934e8ea03e92c.tar.bz2 dexon-solidity-f35ee00ca29873b3e51ce0bfbbf934e8ea03e92c.tar.lz dexon-solidity-f35ee00ca29873b3e51ce0bfbbf934e8ea03e92c.tar.xz dexon-solidity-f35ee00ca29873b3e51ce0bfbbf934e8ea03e92c.tar.zst dexon-solidity-f35ee00ca29873b3e51ce0bfbbf934e8ea03e92c.zip |
Bit operators should bind more strongly than comparison operators.
-rw-r--r-- | SolidityNameAndTypeResolution.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/SolidityNameAndTypeResolution.cpp b/SolidityNameAndTypeResolution.cpp index 0bda0a1f..c7f0b3ab 100644 --- a/SolidityNameAndTypeResolution.cpp +++ b/SolidityNameAndTypeResolution.cpp @@ -311,6 +311,16 @@ BOOST_AUTO_TEST_CASE(forward_function_reference) BOOST_CHECK_NO_THROW(parseTextAndResolveNames(text)); } +BOOST_AUTO_TEST_CASE(comparison_bitop_precedence) +{ + char const* text = "contract First {\n" + " function fun() returns (bool ret) {\n" + " return 1 & 2 == 8 & 9;\n" + " }\n" + "}\n"; + BOOST_CHECK_NO_THROW(parseTextAndResolveNames(text)); +} + BOOST_AUTO_TEST_SUITE_END() } |