Commit af80af22 authored by Robert Griesemer's avatar Robert Griesemer
Browse files

cmd/compile/internal/types2: do not declare new methods on instantiated types

Report an error if an alias is used to declare a method on an
instantiated type.

Also, when resolving the receiver type, don't use asNamed to
avoid premature expansion of the type.

Fixes #47968.

Change-Id: Ie5acc4cfb1944deaaeeaee98707f31e256f8ef5e
Reviewed-on: https://go-review.googlesource.com/c/go/+/345472


Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
parent 03db2c24
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment