summaryrefslogtreecommitdiff
path: root/Test/dafny0/TriggerInPredicate.dfy
diff options
context:
space:
mode:
Diffstat (limited to 'Test/dafny0/TriggerInPredicate.dfy')
-rw-r--r--Test/dafny0/TriggerInPredicate.dfy19
1 files changed, 19 insertions, 0 deletions
diff --git a/Test/dafny0/TriggerInPredicate.dfy b/Test/dafny0/TriggerInPredicate.dfy
new file mode 100644
index 00000000..b9c372dc
--- /dev/null
+++ b/Test/dafny0/TriggerInPredicate.dfy
@@ -0,0 +1,19 @@
+// RUN: %dafny /compile:0 /dprint:"%t.dprint" /autoTriggers:1 /printTooltips "%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) {}
+
+// Local Variables:
+// dafny-prover-local-args: ("/autoTriggers:1")
+// End: