Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/cmd/compile/internal/ir/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (p *dumper) dump(x reflect.Value, depth int) {
return
}

if pos, ok := x.Interface().(src.XPos); ok {
if pos, ok := reflect.TypeAssert[src.XPos](x); ok {
p.printf("%s", base.FmtPos(pos))
return
}
Expand Down Expand Up @@ -193,7 +193,7 @@ func (p *dumper) dump(x reflect.Value, depth int) {
typ := x.Type()

isNode := false
if n, ok := x.Interface().(Node); ok {
if n, ok := reflect.TypeAssert[Node](x); ok {
isNode = true
p.printf("%s %s {", n.Op().String(), p.addr(x))
} else {
Expand Down Expand Up @@ -222,7 +222,7 @@ func (p *dumper) dump(x reflect.Value, depth int) {
omitted = true
continue // exclude zero-valued fields
}
if n, ok := x.Interface().(Nodes); ok && len(n) == 0 {
if n, ok := reflect.TypeAssert[Nodes](x); ok && len(n) == 0 {
omitted = true
continue // exclude empty Nodes slices
}
Expand Down