summaryrefslogtreecommitdiff
path: root/Test/new-tests/trigger-in-predicate.dfy
diff options
context:
space:
mode:
Diffstat (limited to 'Test/new-tests/trigger-in-predicate.dfy')
-rw-r--r--Test/new-tests/trigger-in-predicate.dfy15
1 files changed, 15 insertions, 0 deletions
diff --git a/Test/new-tests/trigger-in-predicate.dfy b/Test/new-tests/trigger-in-predicate.dfy
new file mode 100644
index 00000000..880d3d1d
--- /dev/null
+++ b/Test/new-tests/trigger-in-predicate.dfy
@@ -0,0 +1,15 @@
+// RUN: %dafny /compile:0 /dprint:"%t.dprint" "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+predicate A(x: bool, y: bool) { x }
+
+predicate B(x: bool, z: bool) { forall y {:trigger A(x, y) } :: A(x, y) && z }
+
+// Inlining is disabled here to prevent pollution of the trigger in B
+method C() requires B(true || false, true) {}
+
+// Inlining should work fine here
+method C'() requires B(true, true) {}
+
+// Inlining should work fine here
+method C''() requires B(true, true && false) {}