aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/noder')
-rw-r--r--src/cmd/compile/internal/noder/reader.go14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/cmd/compile/internal/noder/reader.go b/src/cmd/compile/internal/noder/reader.go
index 3fc6a659d9..7099806cba 100644
--- a/src/cmd/compile/internal/noder/reader.go
+++ b/src/cmd/compile/internal/noder/reader.go
@@ -2874,20 +2874,12 @@ func (r *reader) methodExpr() (wrapperFn, baseFn, dictPtr ir.Node) {
return fn, fn, nil
}
- // TODO(mdempsky): I'm pretty sure this isn't needed: implicits is
- // only relevant to locally defined types, but they can't have
- // (non-promoted) methods.
- var implicits []*types.Type
- if r.dict != nil {
- implicits = r.dict.targs
- }
-
if r.Bool() { // dynamic subdictionary
idx := r.Len()
info := r.dict.subdicts[idx]
explicits := r.p.typListIdx(info.explicits, r.dict)
- shapedObj := r.p.objIdx(info.idx, implicits, explicits, true).(*ir.Name)
+ shapedObj := r.p.objIdx(info.idx, nil, explicits, true).(*ir.Name)
shapedFn := shapedMethodExpr(pos, shapedObj, sym)
// TODO(mdempsky): Is there a more robust way to get the
@@ -2902,10 +2894,10 @@ func (r *reader) methodExpr() (wrapperFn, baseFn, dictPtr ir.Node) {
info := r.objInfo()
explicits := r.p.typListIdx(info.explicits, r.dict)
- shapedObj := r.p.objIdx(info.idx, implicits, explicits, true).(*ir.Name)
+ shapedObj := r.p.objIdx(info.idx, nil, explicits, true).(*ir.Name)
shapedFn := shapedMethodExpr(pos, shapedObj, sym)
- dict := r.p.objDictName(info.idx, implicits, explicits)
+ dict := r.p.objDictName(info.idx, nil, explicits)
dictPtr := typecheck.Expr(ir.NewAddrExpr(pos, dict))
// Check that dictPtr matches shapedFn's dictionary parameter.