summaryrefslogtreecommitdiff
path: root/Test/dafny0/CallStmtTests.dfy
blob: 735efe810bd15583f2e454c11ce12a555c2ce8e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

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;
}