From 13bd6ddbe7a4fb24448546545da5df999267eb4e Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Tue, 9 Aug 2022 03:03:32 +0700 Subject: [PATCH] cmd/compile/internal/typecheck: simplify tcAppend After CL 418514, Unified IR now always write concrete type of constant expressions, thus we don't need to handle untyped string anymore. Change-Id: Ic930ee2418746ca9f4a5122c614e077bef8d7eb4 Reviewed-on: https://go-review.googlesource.com/c/go/+/422041 TryBot-Result: Gopher Robot Run-TryBot: Cuong Manh Le Reviewed-by: Than McIntosh Reviewed-by: Matthew Dempsky --- src/cmd/compile/internal/typecheck/func.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/cmd/compile/internal/typecheck/func.go b/src/cmd/compile/internal/typecheck/func.go index 7790e65ca22..40eab64a543 100644 --- a/src/cmd/compile/internal/typecheck/func.go +++ b/src/cmd/compile/internal/typecheck/func.go @@ -460,11 +460,6 @@ func tcAppend(n *ir.CallExpr) ir.Node { return n } - if t.Elem().IsKind(types.TUINT8) && args[1].Type().IsString() { - args[1] = DefaultLit(args[1], types.Types[types.TSTRING]) - return n - } - // AssignConv is of args[1] not required here, as the // types of args[0] and args[1] don't need to match // (They will both have an underlying type which are