blob: 6d3412d727d76b5af4bb59290385d474d25b3afc (
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 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// calling fields should not make a resolution error:
class Ref<A> {
var val: A;
}
method Nope() {
var f := new Ref<int -> bool>;
assert f.val(0);
}
class FnRef<A,B> {
var fn: A -> B;
}
method Nope2() {
var f := new FnRef<int,bool>;
assert f.fn(0);
}
|