Skip to content

cmd/compile: generic method values behave differently than specific ones #54447

Open
@mdempsky

Description

@mdempsky

https://go.dev/play/p/zU0yk_nHw0_w

The above test program demonstrates the semantics of var t T; _ = t.M where T is either a type alias of one of a few types (I, struct { I }, or struct { *X }); or it's a type parameter instantiated as that same type.

I think the intended spec semantics are that the corresponding specific and generic cases should always match.

Further, under the interpretation in #6475 (comment), I believe that all cases should panic.

/cc @griesemer @ianlancetaylor for confirming expected behavior

Metadata

Metadata

Assignees

Labels

NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions