fix: dont assign receiver on indexExpr
This commit is contained in:
18
_test/method32.go
Normal file
18
_test/method32.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var a = []func(string){bar}
|
||||
b := a[0]
|
||||
b("bar")
|
||||
}
|
||||
|
||||
func bar(a string) {
|
||||
fmt.Println(a)
|
||||
}
|
||||
|
||||
// Output:
|
||||
// bar
|
||||
@@ -721,7 +721,6 @@ func (interp *Interpreter) cfg(root *node, pkgID string) ([]*node, error) {
|
||||
n.typ = t.val
|
||||
}
|
||||
n.findex = sc.add(n.typ)
|
||||
n.recv = &receiver{node: n}
|
||||
typ := t.TypeOf()
|
||||
switch k := typ.Kind(); k {
|
||||
case reflect.Map:
|
||||
|
||||
Reference in New Issue
Block a user