diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-02-17 20:46:30 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-02-17 20:46:30 +0800 |
commit | aa36a6ae4f24f07e2c470a21c93ff37ad5861982 (patch) | |
tree | dba654e20554d28383c1f3bb8164fa9f5849d1bd /Godeps/_workspace/src/github.com/robertkrimen/otto/clone.go | |
parent | 4f28c5b69d652e12adf8a88f526f459a492e159e (diff) | |
parent | 6ba7bbbe29029c8bf2bf75f8ebcbd3847eafa401 (diff) | |
download | go-tangerine-aa36a6ae4f24f07e2c470a21c93ff37ad5861982.tar go-tangerine-aa36a6ae4f24f07e2c470a21c93ff37ad5861982.tar.gz go-tangerine-aa36a6ae4f24f07e2c470a21c93ff37ad5861982.tar.bz2 go-tangerine-aa36a6ae4f24f07e2c470a21c93ff37ad5861982.tar.lz go-tangerine-aa36a6ae4f24f07e2c470a21c93ff37ad5861982.tar.xz go-tangerine-aa36a6ae4f24f07e2c470a21c93ff37ad5861982.tar.zst go-tangerine-aa36a6ae4f24f07e2c470a21c93ff37ad5861982.zip |
Merge pull request #2206 from fjl/update-deps
Godeps: update all dependencies
Diffstat (limited to 'Godeps/_workspace/src/github.com/robertkrimen/otto/clone.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/robertkrimen/otto/clone.go | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/clone.go b/Godeps/_workspace/src/github.com/robertkrimen/otto/clone.go index f79901b35..82cb0f0af 100644 --- a/Godeps/_workspace/src/github.com/robertkrimen/otto/clone.go +++ b/Godeps/_workspace/src/github.com/robertkrimen/otto/clone.go @@ -140,11 +140,23 @@ func (clone *_clone) stash(in _stash) _stash { func (clone *_clone) property(in _property) _property { out := in - if value, valid := in.value.(Value); valid { + + switch value := in.value.(type) { + case Value: out.value = clone.value(value) - } else { - panic(fmt.Errorf("in.value.(Value) != true")) + case _propertyGetSet: + p := _propertyGetSet{} + if value[0] != nil { + p[0] = clone.object(value[0]) + } + if value[1] != nil { + p[1] = clone.object(value[1]) + } + out.value = p + default: + panic(fmt.Errorf("in.value.(Value) != true; in.value is %T", in.value)) } + return out } |