Source file test/fixedbugs/issue45258.go
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 7 package main 8 9 type Fooer interface { 10 Foo() Barer 11 } 12 13 type Barer interface { 14 Bar() 15 } 16 17 type impl struct{} 18 19 func (r *impl) Foo() Barer { 20 return r 21 } 22 23 func (r *impl) Bar() {} 24 25 func f1() { 26 var r Fooer = &impl{} 27 r.Foo().Bar() 28 } 29