@@ -1197,23 +1197,17 @@ func (r *importReader) node() ir.Node {
1197
1197
pos := r .pos ()
1198
1198
expr := r .expr ()
1199
1199
sel := r .exoticSelector ()
1200
- n := ir .NewSelectorExpr (pos , ir .OXDOT , expr , sel )
1201
- n .SetOp (op )
1200
+ n := ir .NewSelectorExpr (pos , op , expr , sel )
1202
1201
n .SetType (r .exoticType ())
1203
1202
switch op {
1204
- case ir .ODOT , ir .ODOTPTR , ir .ODOTINTER , ir . OMETHEXPR :
1203
+ case ir .ODOT , ir .ODOTPTR , ir .ODOTINTER :
1205
1204
n .Selection = r .exoticParam ()
1206
- if op == ir .OMETHEXPR {
1207
- if r .bool () { // has name
1208
- ir .MethodExprName (n ).SetType (r .exoticType ())
1209
- }
1210
- }
1211
- case ir .ODOTMETH , ir .OCALLPART :
1205
+ case ir .ODOTMETH , ir .OCALLPART , ir .OMETHEXPR :
1212
1206
// These require a Lookup to link to the correct declaration.
1213
1207
rcvrType := expr .Type ()
1214
1208
typ := n .Type ()
1215
1209
n .Selection = Lookdot (n , rcvrType , 1 )
1216
- if op == ir .OCALLPART {
1210
+ if op == ir .OCALLPART || op == ir . OMETHEXPR {
1217
1211
// Lookdot clobbers the opcode and type, undo that.
1218
1212
n .SetOp (op )
1219
1213
n .SetType (typ )
0 commit comments