aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/nameAndTypeResolution
diff options
context:
space:
mode:
authorChristian Parpart <christian@ethereum.org>2018-07-05 18:31:46 +0800
committerchriseth <chris@ethereum.org>2018-07-12 19:26:52 +0800
commitcc585138bc08ff421a026d08f07020b284d946ce (patch)
tree583558a78f984faa124e6afd557ec19e9b775fe7 /test/libsolidity/syntaxTests/nameAndTypeResolution
parentfa8102880f87c5a2806d59f959fd3e8a62dd4dc9 (diff)
downloaddexon-solidity-cc585138bc08ff421a026d08f07020b284d946ce.tar
dexon-solidity-cc585138bc08ff421a026d08f07020b284d946ce.tar.gz
dexon-solidity-cc585138bc08ff421a026d08f07020b284d946ce.tar.bz2
dexon-solidity-cc585138bc08ff421a026d08f07020b284d946ce.tar.lz
dexon-solidity-cc585138bc08ff421a026d08f07020b284d946ce.tar.xz
dexon-solidity-cc585138bc08ff421a026d08f07020b284d946ce.tar.zst
dexon-solidity-cc585138bc08ff421a026d08f07020b284d946ce.zip
Generates a syntax error when declaring a variable declaration's LHS has no named components
Diffstat (limited to 'test/libsolidity/syntaxTests/nameAndTypeResolution')
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/239_multi_variable_declaration_wildcards_fine.sol2
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/246_multi_variable_declaration_wildcards_fail_5.sol1
2 files changed, 3 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/239_multi_variable_declaration_wildcards_fine.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/239_multi_variable_declaration_wildcards_fine.sol
index 0da5c7ee..f3afd0cc 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/239_multi_variable_declaration_wildcards_fine.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/239_multi_variable_declaration_wildcards_fine.sol
@@ -13,6 +13,8 @@ contract C {
}
}
// ----
+// SyntaxError: (307-325): The use of the "var" keyword is disallowed. The declaration part of the statement can be removed, since it is empty.
+// SyntaxError: (335-350): The use of the "var" keyword is disallowed. The declaration part of the statement can be removed, since it is empty.
// Warning: (179-198): Different number of components on the left hand side (2) than on the right hand side (3).
// Warning: (208-233): Different number of components on the left hand side (3) than on the right hand side (2).
// Warning: (243-262): Different number of components on the left hand side (2) than on the right hand side (3).
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/246_multi_variable_declaration_wildcards_fail_5.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/246_multi_variable_declaration_wildcards_fail_5.sol
index 3d2d0705..3599a342 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/246_multi_variable_declaration_wildcards_fail_5.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/246_multi_variable_declaration_wildcards_fail_5.sol
@@ -3,4 +3,5 @@ contract C {
function f() public { var (,) = one(); }
}
// ----
+// SyntaxError: (81-96): The use of the "var" keyword is disallowed. The declaration part of the statement can be removed, since it is empty.
// TypeError: (81-96): Wildcard both at beginning and end of variable declaration list is only allowed if the number of components is equal.