mirror of
https://github.com/golang/go
synced 2025-08-05 01:00:32 +00:00
Given code like func itou(i int) uint { return uint(i) } var x = itou(-1) the static inliner from CL 450136 was rewriting the code to var x = uint(-1) which is not valid Go code. Fix this by converting the constants appropriately during inlining. Fixes golang.org/x/image/vector test. Change-Id: I13448df8504c6a70525b1cdc36e2c947e22cdd33 Reviewed-on: https://go-review.googlesource.com/c/go/+/451376 Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Keith Randall <khr@google.com> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
4.7 KiB
4.7 KiB