summaryrefslogtreecommitdiff
path: root/Test/wishlist/naked-function-in-recursive-setting.dfy
blob: 650fc4c333423fb5b7d6757c551189359e4d8cd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %dafny /compile:0 /print:"%t.print" /dprint:"%t.dprint" /printTooltips "%s" > "%t"
// RUN: %diff "%s.expect" "%t"

function fact(n: int): int
  requires n >= 0
{
  if n == 0 then
    1
  else (
    assert fact.requires(n-1); //WISH
    n * fact(n-1)
  )
}