compiler/cl: inst named stable sort

This commit is contained in:
visualfc
2025-02-01 13:30:33 +08:00
parent 4f5468469b
commit b6b686665a
2 changed files with 9 additions and 9 deletions

View File

@@ -1112,7 +1112,7 @@ func processPkg(ctx *context, ret llssa.Package, pkg *ssa.Package) {
}
}
sort.Slice(typs, func(i, j int) bool {
return typs[i].Obj().Name() < typs[j].Obj().Name()
return typs[i].String() < typs[j].String()
})
for _, typ := range typs {
ctx.compileMethods(ret, typ)