compiler: make main function normally to compatible multiple main functions in testing mode

This commit is contained in:
Li Jie
2025-01-13 09:37:26 +08:00
parent 5cfeddef73
commit 85d01d6f28
6 changed files with 64 additions and 72 deletions

View File

@@ -554,9 +554,6 @@ func FuncName(pkg *types.Package, name string, recv *types.Var, org bool) string
return PathOf(pkg) + "." + tName + "." + name
}
ret := FullName(pkg, name)
if ret == "main.main" {
ret = "main"
}
return ret
}