From 31fa6a24df0e698a2c086a8efb7162fa13c061b8 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 17 May 2018 09:04:39 +0200 Subject: Move more parser tests to syntax tests --- test/libsolidity/syntaxTests/parsing/if_statement.sol | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/libsolidity/syntaxTests/parsing/if_statement.sol (limited to 'test/libsolidity/syntaxTests/parsing/if_statement.sol') diff --git a/test/libsolidity/syntaxTests/parsing/if_statement.sol b/test/libsolidity/syntaxTests/parsing/if_statement.sol new file mode 100644 index 00000000..0819cb9f --- /dev/null +++ b/test/libsolidity/syntaxTests/parsing/if_statement.sol @@ -0,0 +1,11 @@ +contract test { + function fun(uint256 a) returns (uint) { + if (a >= 8) { return 2; } else { var b = 7; } + } +} +// ---- +// Warning: (102-107): Use of the "var" keyword is deprecated. +// Warning: (102-111): 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: (20-120): No visibility specified. Defaulting to "public". +// Warning: (102-107): Unused local variable. +// Warning: (20-120): Function state mutability can be restricted to pure -- cgit