demo: getcwd; abi.TypeName fix: error interface is public

This commit is contained in:
xushiwei
2024-06-19 23:58:20 +08:00
parent 3ead4b4d4b
commit 6cb42a4251
2 changed files with 13 additions and 1 deletions

View File

@@ -154,7 +154,8 @@ func (b *Builder) TypeName(t types.Type) (ret string, pub bool) {
return fmt.Sprintf("[%v]%s", t.Len(), ret), pub
case *types.Named:
o := t.Obj()
return "_llgo_" + TypeName(o), o.Exported()
pkg := o.Pkg()
return "_llgo_" + FullName(pkg, o.Name()), (pkg == nil || o.Exported())
case *types.Interface:
if t.Empty() {
return "_llgo_any", true