aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/parsing/multi_variable_declarations.sol
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-05-16 15:44:47 +0800
committerGitHub <noreply@github.com>2018-05-16 15:44:47 +0800
commit03c248440770202bb67b4818ff86608fd6a7789d (patch)
treee192ce036784bef7362e33052c43323c2a1f31b6 /test/libsolidity/syntaxTests/parsing/multi_variable_declarations.sol
parentc9879a6b2b20d455e30119639bbe5f052bd813e1 (diff)
parent7fb43fe8542679fe91fef460d1a5d15fb8f83cca (diff)
downloaddexon-solidity-03c248440770202bb67b4818ff86608fd6a7789d.tar
dexon-solidity-03c248440770202bb67b4818ff86608fd6a7789d.tar.gz
dexon-solidity-03c248440770202bb67b4818ff86608fd6a7789d.tar.bz2
dexon-solidity-03c248440770202bb67b4818ff86608fd6a7789d.tar.lz
dexon-solidity-03c248440770202bb67b4818ff86608fd6a7789d.tar.xz
dexon-solidity-03c248440770202bb67b4818ff86608fd6a7789d.tar.zst
dexon-solidity-03c248440770202bb67b4818ff86608fd6a7789d.zip
Merge pull request #4145 from ethereum/more-parser-test-moves
Move couple of parser tests to syntax tests.
Diffstat (limited to 'test/libsolidity/syntaxTests/parsing/multi_variable_declarations.sol')
-rw-r--r--test/libsolidity/syntaxTests/parsing/multi_variable_declarations.sol29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/parsing/multi_variable_declarations.sol b/test/libsolidity/syntaxTests/parsing/multi_variable_declarations.sol
new file mode 100644
index 00000000..818999df
--- /dev/null
+++ b/test/libsolidity/syntaxTests/parsing/multi_variable_declarations.sol
@@ -0,0 +1,29 @@
+contract C {
+ function f() {
+ var (a,b,c) = g();
+ var (d) = 2;
+ var (,e) = 3;
+ var (f,) = 4;
+ var (x,,) = g();
+ var (,y,) = g();
+ var () = g();
+ var (,,) = g();
+ }
+ function g() returns (uint, uint, uint) {}
+}
+// ----
+// Warning: (36-37): Use of the "var" keyword is deprecated.
+// Warning: (38-39): Use of the "var" keyword is deprecated.
+// Warning: (40-41): Use of the "var" keyword is deprecated.
+// Warning: (57-58): Use of the "var" keyword is deprecated.
+// Warning: (73-74): Use of the "var" keyword is deprecated.
+// Warning: (88-89): Use of the "var" keyword is deprecated.
+// Warning: (104-105): Use of the "var" keyword is deprecated.
+// Warning: (124-125): Use of the "var" keyword is deprecated.
+// Warning: (88-89): This declaration shadows an existing declaration.
+// Warning: (52-63): The type of this variable was inferred as uint8, which can hold values between 0 and 255. This is probably not desired. Use an explicit type to silence this warning.
+// Warning: (67-79): Different number of components on the left hand side (2) than on the right hand side (1).
+// Warning: (67-79): The type of this variable was inferred as uint8, which can hold values between 0 and 255. This is probably not desired. Use an explicit type to silence this warning.
+// Warning: (83-95): Different number of components on the left hand side (2) than on the right hand side (1).
+// Warning: (83-95): The type of this variable was inferred as uint8, which can hold values between 0 and 255. This is probably not desired. Use an explicit type to silence this warning.
+// TypeError: (137-149): Too many components (3) in value for variable assignment (0) needed