From 05c28aabb48eb97bca36971b28ce6e42a5e4ed49 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 6 May 2020 21:55:40 -0700 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Alan Donovan --- go/ssa/interp/ops.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/ssa/interp/ops.go b/go/ssa/interp/ops.go index e04e451833..90d945291b 100644 --- a/go/ssa/interp/ops.go +++ b/go/ssa/interp/ops.go @@ -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) } }