blob: 67e66b340cd88001cf5a36575968cdca3c4e0d2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// RUN: %dafny /compile:0 /print:"%t.print" /dprint:"%t.dprint" "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method testing1(t: int)
{
t := m(); // error: should be checked at the Dafny level, not fall to Boogie.
}
method m() returns (r: int)
{
return 3;
}
method testing2()
{
var v;
v := m2(); // error: v needs to be ghost because r is.
}
method m2() returns (ghost r: int)
{
r := 23;
}
|