cmd/compile: generic method values behave differently than specific ones #54447
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
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 }
, orstruct { *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
The text was updated successfully, but these errors were encountered: