aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/double_variable_declaration.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/double_variable_declaration.sol')
-rw-r--r--test/libsolidity/syntaxTests/double_variable_declaration.sol5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/libsolidity/syntaxTests/double_variable_declaration.sol b/test/libsolidity/syntaxTests/double_variable_declaration.sol
index 9ab87959..53c5c9be 100644
--- a/test/libsolidity/syntaxTests/double_variable_declaration.sol
+++ b/test/libsolidity/syntaxTests/double_variable_declaration.sol
@@ -1,8 +1,9 @@
contract test {
function f() pure public {
uint256 x;
- if (true) { uint256 x; }
+ x = 1;
+ if (true) { uint256 x; x = 2; }
}
}
// ----
-// DeclarationError: (71-80): Identifier already declared.
+// Warning: (80-89): This declaration shadows an existing declaration.