- 
                Notifications
    
You must be signed in to change notification settings  - Fork 18.4k
 
Closed
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
https://tip.golang.org/ref/spec#Struct_types defines
EmbeddedField = [ "*" ] TypeName .
with
TypeName  = identifier | QualifiedIdent .
QualifiedIdent = PackageName "." identifier .
if I am not mistaken, that doesn't permit the following valid program:
type S1[T any] struct{ F T }
type S2 struct{ S1[int] }
func main() { fmt.Println(S2{}.F) }
(https://go.dev/play/p/ZmKJ9hWyhOZ)
/cc @griesemer
Edit: LiteralType seems to have a similar issue for composite literals, via https://groups.google.com/g/golang-nuts/c/W_kqb9rfT5c
dsnet, ericlagergren and smasher164
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.