1// compile
2
3// Copyright 2021 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7package main
8
9type Fooer interface {
10	Foo() Barer
11}
12
13type Barer interface {
14	Bar()
15}
16
17type impl struct{}
18
19func (r *impl) Foo() Barer {
20	return r
21}
22
23func (r *impl) Bar() {}
24
25func f1() {
26	var r Fooer = &impl{}
27	r.Foo().Bar()
28}
29