remove type:string

This commit is contained in:
Zxilly 2025-06-06 04:18:02 +08:00
parent a2c54efd5f
commit cefd445939
No known key found for this signature in database
GPG Key ID: 47AB1DEC841BC6A2
1 changed files with 6 additions and 3 deletions

View File

@ -191,9 +191,12 @@ func dumpGlobalConst(n *ir.Name) {
t = types.Types[types.TSTRING]
}
} else {
// If the type of the constant is an instantiated generic, we need to emit
// that type so the linker knows about it. See issue 51245.
_ = reflectdata.TypeLinksym(t)
if t.IsInteger() {
// If the type of the constant is an instantiated generic, we need to emit
// that type so the linker knows about it. See issue 51245.
_ = reflectdata.TypeLinksym(t)
}
// For const string, type:string isn't the real type.
}
if t.IsInteger() {