aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/parsing/conditional_with_variables.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/parsing/conditional_with_variables.sol')
-rw-r--r--test/libsolidity/syntaxTests/parsing/conditional_with_variables.sol13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/parsing/conditional_with_variables.sol b/test/libsolidity/syntaxTests/parsing/conditional_with_variables.sol
new file mode 100644
index 00000000..eb4c7091
--- /dev/null
+++ b/test/libsolidity/syntaxTests/parsing/conditional_with_variables.sol
@@ -0,0 +1,13 @@
+contract A {
+ function f() {
+ uint x = 3;
+ uint y = 1;
+ uint z = (x > y) ? x : y;
+ uint w = x > y ? x : y;
+ }
+}
+// ----
+// Warning: (17-143): No visibility specified. Defaulting to "public".
+// Warning: (80-86): Unused local variable.
+// Warning: (114-120): Unused local variable.
+// Warning: (17-143): Function state mutability can be restricted to pure