]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: fix wrong instantiated type for embedded receiver
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Wed, 8 Sep 2021 18:11:26 +0000 (01:11 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Thu, 9 Sep 2021 03:31:51 +0000 (03:31 +0000)
commit2481f6e367a56207b6c873180e0db9bc4f2b6365
treeb3ad5c6f8a31d72402246a5857e3bc9f5275fe9e
parentd62866ef793872779c9011161e51b9c805fcb73d
cmd/compile: fix wrong instantiated type for embedded receiver

In case of embedded field, if the receiver was fully instantiated, we
must use its instantiated type, instead of passing the type params of
the base receiver.

Fixes #47797
Fixes #48253

Change-Id: I97613e7e669a72605137e82406f7bf5fbb629378
Reviewed-on: https://go-review.googlesource.com/c/go/+/348549
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
src/cmd/compile/internal/noder/expr.go
test/typeparam/issue47797.go [new file with mode: 0644]
test/typeparam/issue48253.go [new file with mode: 0644]