1
0
mirror of https://github.com/golang/go synced 2024-11-17 07:04:44 -07:00

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 <gobot@golang.org>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Cuong Manh Le 2022-08-09 03:03:32 +07:00
parent 2699065483
commit 13bd6ddbe7

View File

@ -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