]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: unique LinkString for renamed, embedded fields
authorMatthew Dempsky <mdempsky@google.com>
Thu, 16 Dec 2021 20:55:15 +0000 (12:55 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 10 Jan 2022 17:54:35 +0000 (17:54 +0000)
commit933f6685f7d33f3865d6ef062cbb0944d3f5d2fc
tree4dac3f9af4c69071a3a94ee40e90e58fa01d10b1
parent9e7ea3566e662ba498d64cb63146575202a053ee
cmd/compile: unique LinkString for renamed, embedded fields

Using type aliases, it's possible to create structs with embedded
fields that have no corresponding type literal notation. However, we
still need to generate a unique name for these types to use for linker
symbols. This CL introduces a new "struct{ Name = Type }" syntax for
use in LinkString formatting to represent these types.

Fixes #50190.

Change-Id: I025ceb09a86e00b7583d3b9885d612f5d6cb44fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/372914
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Trust: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/types/fmt.go
test/fixedbugs/issue50190.go [new file with mode: 0644]