fix __Boolean__ and calcOr

This commit is contained in:
2023-06-21 00:18:52 +01:00
parent 40a1404534
commit 6495e7f9b9
4 changed files with 26 additions and 1 deletions

View File

@@ -318,5 +318,17 @@ func Map(m anymap) ArObject {
return keys, ArErr{}
},
}
obj.obj["__Boolean__"] = builtinFunc{
"__Boolean__",
func(args ...any) (any, ArErr) {
mutex.RLock()
if len(m) == 0 {
mutex.RUnlock()
return false, ArErr{}
}
mutex.RUnlock()
return true, ArErr{}
},
}
return obj
}