mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime, type switch: eliminate package global name space assumption
bonus: type switch now detects multiple uses of identical interface types. bonus: interface types are now order-independent, following the spec. R=ken2 CC=golang-dev https://golang.org/cl/194053
This commit is contained in:
parent
3b1a0355b6
commit
1912632019
17 changed files with 422 additions and 166 deletions
|
|
@ -952,7 +952,7 @@ func (v *InterfaceValue) Method(i int) *FuncValue {
|
|||
data := &value{Typeof((*byte)(nil)), addr(uintptr(v.addr) + ptrSize), true}
|
||||
|
||||
// Function pointer is at p.perm in the table.
|
||||
fn := tab.Fn[p.perm]
|
||||
fn := tab.Fn[i]
|
||||
fv := &FuncValue{value: value{toType(*p.typ), addr(&fn), true}, first: data, isInterface: true}
|
||||
return fv
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue