refactor objects
Some checks failed
Publish Image / publish (push) Waiting to run
Test / build (push) Waiting to run
Build / build (push) Has been cancelled

This commit is contained in:
2024-04-01 17:34:10 -04:00
parent 803f330e82
commit 99f7553d67
15 changed files with 101 additions and 94 deletions

View File

@@ -14,8 +14,8 @@ func HashOf(args ...object.Object) object.Object {
return newError(err.Error())
}
if hash, ok := args[0].(object.Hashable); ok {
return object.Integer{Value: int64(hash.HashKey().Value)}
if hash, ok := args[0].(object.Hasher); ok {
return object.Integer{Value: int64(hash.Hash().Value)}
}
return newError("TypeError: hash() expected argument #1 to be hashable")