mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #655 from chriseth/sol_precedence
Bit operators should bind more strongly than comparison operators.
This commit is contained in:
commit
7795b2a892
@ -311,6 +311,16 @@ BOOST_AUTO_TEST_CASE(forward_function_reference)
|
|||||||
BOOST_CHECK_NO_THROW(parseTextAndResolveNames(text));
|
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 && 1 ^ 2 < 4 | 6;\n"
|
||||||
|
" }\n"
|
||||||
|
"}\n";
|
||||||
|
BOOST_CHECK_NO_THROW(parseTextAndResolveNames(text));
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE_END()
|
BOOST_AUTO_TEST_SUITE_END()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user