2019-03-15 11:58:21 -06:00
|
|
|
// Copyright 2019 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package b
|
|
|
|
|
2021-07-02 17:59:01 -06:00
|
|
|
import "issue30862.dir/a"
|
2019-03-15 11:58:21 -06:00
|
|
|
|
|
|
|
type EmbedImported struct {
|
|
|
|
a.NoitfStruct
|
|
|
|
}
|
|
|
|
|
|
|
|
func Test() []string {
|
|
|
|
bad := []string{}
|
|
|
|
x := interface{}(new(a.NoitfStruct))
|
|
|
|
if _, ok := x.(interface {
|
|
|
|
NoInterfaceMethod()
|
|
|
|
}); ok {
|
|
|
|
bad = append(bad, "fail 1")
|
|
|
|
}
|
|
|
|
|
|
|
|
x = interface{}(new(EmbedImported))
|
|
|
|
if _, ok := x.(interface {
|
|
|
|
NoInterfaceMethod()
|
|
|
|
}); ok {
|
|
|
|
bad = append(bad, "fail 2")
|
|
|
|
}
|
|
|
|
return bad
|
|
|
|
}
|