]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: fix missing condition in usemethod
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Thu, 22 Jul 2021 16:54:19 +0000 (23:54 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Thu, 22 Jul 2021 17:48:41 +0000 (17:48 +0000)
commitfca3e5c4452e8dac6c7ae028dcccc323e1d57ed5
treeb8c7c9b75feb2af318c60daca0c629d7029388b6
parent5ba06495c1ab2c0e7f6e25260d1f92b5008c380e
[dev.typeparams] cmd/compile: fix missing condition in usemethod

CL 330670 simplified usemethod, but dropped the previous condition to
ensure the function have 1 or 2 result. This CL restore that condition,
and also add a test for it.

Change-Id: I434e3736785b43ceea0b386d8d9d01ad78a4ccd2
Reviewed-on: https://go-review.googlesource.com/c/go/+/336609
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/walk/expr.go
test/reflectmethod8.go [new file with mode: 0644]