summaryrefslogtreecommitdiff
path: root/Test/triggers/constructors-cause-matching-loops.dfy
blob: 61e6a66b0abaa13585b62b2200370c5b694b2156 (plain)
1
2
3
4
5
6
7
8
9
10
11
// RUN: %dafny /compile:0 /print:"%t.print" /dprint:"%t.dprint" /autoTriggers:1 /printTooltips "%s" > "%t"
// RUN: %diff "%s.expect" "%t"

// This file is just a small test to check that constructors do cause loops

datatype Nat = Zero | Succ(x: Nat)
function f(n: Nat): Nat

method M() {
  assert forall s :: true || f(Succ(s)) == f(s);
}