go/ssa/interp: avoid vet warning about string(int) conversion

Updates golang/go#32479

Change-Id: I0ede4f0da3f125df39b19a0687d858465cd45e6c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/232718
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Brad Fitzpatrick 2020-05-06 21:55:40 -07:00
parent a4cde3673c
commit 05c28aabb4
1 changed files with 1 additions and 1 deletions

View File

@ -1195,7 +1195,7 @@ func conv(t_dst, t_src types.Type, x value) value {
// TODO(adonovan): fix: test integer -> named alias of string.
if ut_src.Info()&types.IsInteger != 0 {
if ut_dst, ok := ut_dst.(*types.Basic); ok && ut_dst.Kind() == types.String {
return string(asInt(x))
return fmt.Sprintf("%c", x)
}
}