1// compile -p=main
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 I interface {
10	M() interface{}
11}
12
13type S1 struct{}
14
15func (S1) M() interface{} {
16	return nil
17}
18
19type EI interface{}
20
21type S struct{}
22
23func (S) M(as interface{ I }) {}
24
25func f() interface{ EI } {
26	return &S1{}
27}
28
29func main() {
30	var i interface{ I }
31	(&S{}).M(i)
32}
33