We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca3c581 commit f2a35abCopy full SHA for f2a35ab
bind/gen.go
@@ -146,7 +146,10 @@ func (g *Generator) Init() {
146
g.funcs = append(g.funcs, obj)
147
}
148
case *types.TypeName:
149
- named := obj.Type().(*types.Named)
+ named, ok := obj.Type().(*types.Named)
150
+ if !ok {
151
+ continue
152
+ }
153
switch t := named.Underlying().(type) {
154
case *types.Struct:
155
g.structs = append(g.structs, structInfo{obj, t})
@@ -180,7 +183,10 @@ func (g *Generator) Init() {
180
183
continue
181
184
182
185
if obj, ok := obj.(*types.TypeName); ok {
186
187
188
189
190
if t, ok := named.Underlying().(*types.Interface); ok {
191
g.allIntf = append(g.allIntf, interfaceInfo{obj, t, makeIfaceSummary(t)})
192
0 commit comments