aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/parsing/if_statement.sol
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-05-23 21:15:34 +0800
committerGitHub <noreply@github.com>2018-05-23 21:15:34 +0800
commit230bca37c32e5e6603bc2c25a0cff7d8d4fb0d85 (patch)
treeeb4ad5c505571fda56a1f84a36a94e642537c938 /test/libsolidity/syntaxTests/parsing/if_statement.sol
parent18c651b7d39ec5808ce29431aee4e0a90aa1e24f (diff)
parent31fa6a24df0e698a2c086a8efb7162fa13c061b8 (diff)
downloaddexon-solidity-230bca37c32e5e6603bc2c25a0cff7d8d4fb0d85.tar.gz
dexon-solidity-230bca37c32e5e6603bc2c25a0cff7d8d4fb0d85.tar.zst
dexon-solidity-230bca37c32e5e6603bc2c25a0cff7d8d4fb0d85.zip
Merge pull request #4157 from ethereum/parser-tests
Move more parser tests to syntax tests
Diffstat (limited to 'test/libsolidity/syntaxTests/parsing/if_statement.sol')
-rw-r--r--test/libsolidity/syntaxTests/parsing/if_statement.sol11
1 files changed, 11 insertions, 0 deletions
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