xfunc.Func.Nname.Name.Funcdepth = func_.Func.Depth
xfunc.Func.Depth = func_.Func.Depth
xfunc.Func.Endlineno = func_.Func.Endlineno
+ makefuncsym(xfunc.Func.Nname.Sym)
xfunc.Nbody = func_.Nbody
xfunc.Func.Dcl = concat(func_.Func.Dcl, xfunc.Func.Dcl)
Fatal("funchdr: dclcontext")
}
+ if importpkg == nil && n.Func.Nname != nil {
+ makefuncsym(n.Func.Nname.Sym)
+ }
+
dclcontext = PAUTO
markdcl()
Funcdepth++
}
s1 := Pkglookup(s.Name+"·f", s.Pkg)
- if s1.Def == nil {
- s1.Def = newfuncname(s1)
- s1.Def.Func.Shortname = newname(s)
- funcsyms = list(funcsyms, s1.Def)
- }
s.Fsym = s1
-
return s1
}
+
+func makefuncsym(s *Sym) {
+ if isblanksym(s) {
+ return
+ }
+ s1 := funcsym(s)
+ s1.Def = newfuncname(s1)
+ s1.Def.Func.Shortname = newname(s)
+ funcsyms = list(funcsyms, s1.Def)
+}