diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-16 09:06:47 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-16 09:48:37 +0800 |
commit | 7fb43fe8542679fe91fef460d1a5d15fb8f83cca (patch) | |
tree | 31f54c66991b8aa5fa287031cd17025041aebb93 /test/libsolidity/syntaxTests/parsing/multi_variable_declarations.sol | |
parent | 2ba0002998d12ea412f17d55b643ec85c02e6a30 (diff) | |
download | dexon-solidity-7fb43fe8542679fe91fef460d1a5d15fb8f83cca.tar.gz dexon-solidity-7fb43fe8542679fe91fef460d1a5d15fb8f83cca.tar.zst dexon-solidity-7fb43fe8542679fe91fef460d1a5d15fb8f83cca.zip |
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.sol | 29 |
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 |