completed list-type to array-type conversion and fixed common test module
This commit is contained in:
+10
-3
@@ -160,12 +160,12 @@ func (dict *DictType) GetItem(key any) (value any, exists bool) {
|
||||
return
|
||||
}
|
||||
|
||||
func (dict *DictType) Clone() (c *DictType) {
|
||||
c = newDict(nil)
|
||||
func (dict *DictType) Clone() kern.Cloner {
|
||||
c := newDict(nil)
|
||||
for k, v := range *dict {
|
||||
(*c)[k] = kern.Clone(v)
|
||||
}
|
||||
return
|
||||
return c
|
||||
}
|
||||
|
||||
func (dict *DictType) Merge(second *DictType) {
|
||||
@@ -176,6 +176,13 @@ func (dict *DictType) Merge(second *DictType) {
|
||||
}
|
||||
}
|
||||
|
||||
func (dict *DictType) EqualTo(other kern.Equaler) (answer bool) {
|
||||
if dict2, ok := other.(*DictType); ok {
|
||||
answer = dict.Equals(*dict2)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (dict *DictType) Equals(dict2 DictType) (answer bool) {
|
||||
if dict2 != nil && len(*dict) == len(dict2) {
|
||||
answer = true
|
||||
|
||||
Reference in New Issue
Block a user