1 // errorcheck -0 -d=ssa/opt/debug=1
5 // Trivial interface call devirtualization test.
11 func (r *real) Value() int { return r.value }
13 type Valuer interface {
17 type indirectiface struct {
21 func (i indirectiface) Value() int {
22 return i.a + i.b + i.c
27 rptr := &real{value: 3}
30 if r.Value() != 3 { // ERROR "de-virtualizing call$"
34 r = indirectiface{3, 4, 5}
35 if r.Value() != 12 { // ERROR "de-virtualizing call$"