mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
parent
7fce5ad011
commit
6e0767bb04
3 changed files with 12 additions and 1 deletions
|
|
@ -906,7 +906,10 @@ func setiface(typ *InterfaceType, x *interface{}, addr addr)
|
|||
|
||||
// Set assigns x to v.
|
||||
func (v *InterfaceValue) Set(x Value) {
|
||||
i := x.Interface();
|
||||
var i interface{}
|
||||
if x != nil {
|
||||
i = x.Interface()
|
||||
}
|
||||
if !v.canSet {
|
||||
panic(cannotSet)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue