aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/smtCheckerTests/010_branches_merge_variables.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/smtCheckerTests/010_branches_merge_variables.sol')
-rw-r--r--test/libsolidity/smtCheckerTests/010_branches_merge_variables.sol11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/smtCheckerTests/010_branches_merge_variables.sol b/test/libsolidity/smtCheckerTests/010_branches_merge_variables.sol
new file mode 100644
index 00000000..c00ef787
--- /dev/null
+++ b/test/libsolidity/smtCheckerTests/010_branches_merge_variables.sol
@@ -0,0 +1,11 @@
+pragma experimental SMTChecker;
+// Positive branch touches variable a, but assertion should still hold.
+contract C {
+ function f(uint x) public pure {
+ uint a = 3;
+ if (x > 10) {
+ a = 3;
+ }
+ assert(a == 3);
+ }
+}