]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: handle ++/-- in noder2 for operands with generic type
authorDan Scales <danscales@google.com>
Mon, 19 Jul 2021 05:10:13 +0000 (22:10 -0700)
committerDan Scales <danscales@google.com>
Wed, 21 Jul 2021 21:30:48 +0000 (21:30 +0000)
commitdcc8350ad304714824cc8e5b8a00105dabb61c54
tree7e0dbb89d24802a992160c7c3ffafecece5f266c
parentf19e49e7b185472b8ff919285e740cc198596497
[dev.typeparams] cmd/compile: handle ++/-- in noder2 for operands with generic type

types2 will have already proved the expression's type is compatible, so
just assign the one const to have the same type as the operand.

Fixes #47258.

Change-Id: If0844e6bf6d0a5e6b11453b87df71353863ccc5d
Reviewed-on: https://go-review.googlesource.com/c/go/+/336009
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
src/cmd/compile/internal/noder/helpers.go
test/typeparam/issue47258.go [new file with mode: 0644]