]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: upgrade ssa to do (int or float) -> complex
authorKeith Randall <khr@golang.org>
Wed, 15 Dec 2021 21:04:54 +0000 (13:04 -0800)
committerKeith Randall <khr@golang.org>
Thu, 16 Dec 2021 00:33:58 +0000 (00:33 +0000)
commitd107aa2cd1fdc596b9275a127e6c35cc5f8d32bb
treecea2411f97ea73d29d3eddc4c17a6e49a8319cd4
parent6e7c6912186b6c91fff332ef473409a8e960c519
cmd/compile: upgrade ssa to do (int or float) -> complex

Generic instantiations can produce conversions from constant
literal ints or floats to complex values. We could constant literals
during instantiation, but it is just as easy to upgrade the code
generator to do the conversions.

Fixes #50193

Change-Id: I24bdc09226c8e868f6282e0e4057ba6c3ad5c41a
Reviewed-on: https://go-review.googlesource.com/c/go/+/372514
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/ssagen/ssa.go
test/typeparam/issue50193.go [new file with mode: 0644]
test/typeparam/issue50193.out [new file with mode: 0644]