Skip to content

Commit 6ff8801

Browse files
mdempskycherrymui
authored andcommitted
[release-branch.go1.18] cmd/compile: revert "fix missing dict pass for type assertions"
This reverts CL 411934 (commit 460a93b). Fixes #53852. Updates #53357. Change-Id: I93d7015d8962d22ffd73128b038e4e7e7ca41c2f Reviewed-on: https://go-review.googlesource.com/c/go/+/417615 Run-TryBot: Cherry Mui <[email protected]> Reviewed-by: Cuong Manh Le <[email protected]> Reviewed-by: David Chase <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 76ba1a5 commit 6ff8801

File tree

2 files changed

+2
-44
lines changed

2 files changed

+2
-44
lines changed

src/cmd/compile/internal/noder/stencil.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,10 +1297,10 @@ func (g *genInst) dictPass(info *instInfo) {
12971297
m = convertUsingDictionary(info, info.dictParam, m.Pos(), mce.X, m, m.Type(), false)
12981298
}
12991299
case ir.ODOTTYPE, ir.ODOTTYPE2:
1300-
dt := m.(*ir.TypeAssertExpr)
1301-
if !dt.Type().HasShape() && !dt.X.Type().HasShape() {
1300+
if !m.Type().HasShape() {
13021301
break
13031302
}
1303+
dt := m.(*ir.TypeAssertExpr)
13041304
var rt ir.Node
13051305
if dt.Type().IsInterface() || dt.X.Type().IsEmptyInterface() {
13061306
ix := findDictType(info, m.Type())

test/typeparam/issue53309.go

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)