blob: 498a0a6b93fd19a49577b88377e9f00bf0a65af8 (
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
|
// RUN: %dafny /compile:0 /print:"%t.print" /dprint:"%t.dprint" "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
//related compiler changes
//everything works OK in the following code
trait J
{
function method F(y: int): int
function method G(y: int): int { 12 }
method M(y: int)
method N(y: int) {
var a:int := 100;
assert a==100;
}
}
class C extends J
{
function method NewFunc (a:int, b:int) : int
{
a + b
}
function method F(y: int): int { 20 }
method M(y: int) {
var a:int := 100;
assert a==100;
}
}
|