mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow mismatching types in switch cases and detect duplicates by value for number literals.
This commit is contained in:
@@ -316,7 +316,7 @@ BOOST_AUTO_TEST_CASE(switch_no_cases)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(switch_duplicate_case)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ switch 42 case 1 {} case 1 {} default {} }", DeclarationError, "Duplicate case defined");
|
||||
CHECK_PARSE_ERROR("{ switch 42 case 1 {} case 1 {} default {} }", DeclarationError, "Duplicate case defined.");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(switch_invalid_expression)
|
||||
|
||||
Reference in New Issue
Block a user