Debian Codegraph @

test/fixedbugs/issue30862.dir/b/b.go

raw
1 // Copyright 2019 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 package b
6
7 import "issue30862.dir/a"
8
9 type EmbedImported struct {
10 a.NoitfStruct
11 }
12
13 func Test() []string {
14 bad := []string{}
15 x := interface{}(new(a.NoitfStruct))
16 if _, ok := x.(interface {
17 NoInterfaceMethod()
18 }); ok {
19 bad = append(bad, "fail 1")
20 }
21
22 x = interface{}(new(EmbedImported))
23 if _, ok := x.(interface {
24 NoInterfaceMethod()
25 }); ok {
26 bad = append(bad, "fail 2")
27 }
28 return bad
29 }