Skip to content

Commit

Permalink
cl: fnType.load use gox.CheckFuncEx
Browse files Browse the repository at this point in the history
  • Loading branch information
visualfc committed Dec 21, 2023
1 parent f76c89d commit b687dab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cl/expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,8 @@ func (p *fnType) load(fnt types.Type) {
case *gox.TypeType:
p.initTypeType(v)
case *types.Signature:
if recv := v.Recv(); recv != nil {
switch t := recv.Type().(type) {
if typ, ok := gox.CheckFuncEx(v); ok {
switch t := typ.(type) {
case *gox.TyOverloadFunc:
p.initFuncs(0, t.Funcs...)
return
Expand All @@ -507,8 +507,8 @@ func (p *fnType) load(fnt types.Type) {
return
case *gox.TyTemplateRecvMethod:
if tsig, ok := t.Func.Type().(*types.Signature); ok {
if trecv := tsig.Recv(); trecv != nil {
if t, ok := trecv.Type().(*gox.TyOverloadFunc); ok {
if ex, ok := gox.CheckFuncEx(tsig); ok {
if t, ok := ex.(*gox.TyOverloadFunc); ok {
p.initFuncs(1, t.Funcs...)
return
}
Expand Down

0 comments on commit b687dab

Please sign in to comment.