mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Test shadowing between variables inside and outside of functions.
This commit is contained in:
parent
0d2ae84081
commit
1be3882ade
@ -390,6 +390,12 @@ BOOST_AUTO_TEST_CASE(switch_duplicate_case_different_literal)
|
||||
BOOST_CHECK(successParse("{ switch 1:u256 case \"1\":u256 {} case \"2\":u256 {} }"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(function_shadowing_outside_vars)
|
||||
{
|
||||
CHECK_ERROR("{ let x:u256 function f() -> x:u256 {} }", DeclarationError, "already taken in this scope");
|
||||
BOOST_CHECK(successParse("{ { let x:u256 } function f() -> x:u256 {} }"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(builtins_parser)
|
||||
{
|
||||
struct SimpleDialect: public Dialect
|
||||
|
Loading…
Reference in New Issue
Block a user