Skip to content

Commit 21343e0

Browse files
namusyakamdempsky
authored andcommitted
cmd/compile: remove duplicates by using finishcompare
Updates #23834 Change-Id: If05001f9fd6b97d72069f440102eec6e371908dd Reviewed-on: https://go-review.googlesource.com/97016 Run-TryBot: Kunpei Sakai <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
1 parent a375a6b commit 21343e0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/cmd/compile/internal/gc/walk.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,10 +1700,7 @@ opswitch:
17001700
} else {
17011701
cmp = nod(OOROR, nod(ONE, lt, rt), nod(ONOT, call, nil))
17021702
}
1703-
cmp = typecheck(cmp, Erv)
1704-
cmp = walkexpr(cmp, init)
1705-
cmp.Type = n.Type
1706-
n = cmp
1703+
n = finishcompare(n, cmp, init)
17071704

17081705
case OARRAYLIT, OSLICELIT, OMAPLIT, OSTRUCTLIT, OPTRLIT:
17091706
if isStaticCompositeLiteral(n) && !canSSAType(n.Type) {

0 commit comments

Comments
 (0)