blob: ef4f5bd6a16e41a2e897370b80c8d1de0581c64d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// RUN: %dafny /compile:0 /print:"%t.print" /dprint:"%t.dprint" "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// When a function call violates two preconditions at the same time, it causes
// two errors to be reported for the same token
method A(x: int)
requires x > 0
requires x < 0
{}
method B(x: int) {
A(x);
}
function fA(x: int): int
requires x > 0
requires x < 0 { 1 }
function fB(x: int): int { fA(x) }
|