There was an error while loading. Please reload this page.
1 parent a2c54ef commit cefd445Copy full SHA for cefd445
src/cmd/compile/internal/gc/obj.go
@@ -191,9 +191,12 @@ func dumpGlobalConst(n *ir.Name) {
191
t = types.Types[types.TSTRING]
192
}
193
} else {
194
-// If the type of the constant is an instantiated generic, we need to emit
195
-// that type so the linker knows about it. See issue 51245.
196
-_ = 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.
197
+_ = reflectdata.TypeLinksym(t)
198
+}
199
+// For const string, type:string isn't the real type.
200
201
202
if t.IsInteger() {
0 commit comments