blob: 2f43778524035508c69ceefdda754c47ed77d5e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// RUN: %dafny /compile:3 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
function foo() : (int, int)
{
(5, 10)
}
function bar() : int
{
var (x, y) := foo();
x + y
}
lemma test()
{
var (x, y) := foo();
}
function method foo2() : (int,int)
{
(5, 10)
}
method test2()
{
var (x, y) := foo2();
}
method Main()
{
var (x, y) := foo2();
assert (x+y == 15);
print(x+y);
}
|