aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/smtCheckerTests/013_branches_merge_variables.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/smtCheckerTests/013_branches_merge_variables.sol')
-rw-r--r--test/libsolidity/smtCheckerTests/013_branches_merge_variables.sol13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/smtCheckerTests/013_branches_merge_variables.sol b/test/libsolidity/smtCheckerTests/013_branches_merge_variables.sol
new file mode 100644
index 00000000..0bd1cf3a
--- /dev/null
+++ b/test/libsolidity/smtCheckerTests/013_branches_merge_variables.sol
@@ -0,0 +1,13 @@
+pragma experimental SMTChecker;
+// Variable is reset in both branches
+contract C {
+ function f(uint x) public pure {
+ uint a = 2;
+ if (x > 10) {
+ a = 3;
+ } else {
+ a = 3;
+ }
+ assert(a == 3);
+ }
+}