completed list-type to array-type conversion and fixed common test module

This commit is contained in:
2026-07-13 10:42:17 +02:00
parent 77f36642b4
commit 072fd9af39
39 changed files with 160 additions and 318 deletions
+10 -3
View File
@@ -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