From 2b98a697b63d44ce96bb9432fb746ef8d1e855be Mon Sep 17 00:00:00 2001 From: Liu Liu Date: Fri, 13 Jan 2023 22:46:19 -0500 Subject: [PATCH] Fix subscription have the wrong type for Int / UInt in WorkspaceDictionary. --- src/sqlite/SQLiteWorkspaceDictionary.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sqlite/SQLiteWorkspaceDictionary.swift b/src/sqlite/SQLiteWorkspaceDictionary.swift index c18dec2a4..a4b9caa4b 100644 --- a/src/sqlite/SQLiteWorkspaceDictionary.swift +++ b/src/sqlite/SQLiteWorkspaceDictionary.swift @@ -883,14 +883,14 @@ extension SQLiteWorkspaceDictionary { DictItem.key == key && DictItem.namespace == storage.namespace ).first { assert(value.valueType == .longValue) - let object = value.longValue + let object = Int(value.longValue) storage.lock(tuple.1) // If no one else populated the cache, do that now. if storage.get(key, hashValue: tuple.1) == nil { storage.set(key, hashValue: tuple.1, value: object) } storage.unlock(tuple.1) - fetchedValue = Int(object) + fetchedValue = object } else { storage.lock(tuple.1) // If no one else populated the cache, do that now. @@ -930,14 +930,14 @@ extension SQLiteWorkspaceDictionary { DictItem.key == key && DictItem.namespace == storage.namespace ).first { assert(value.valueType == .unsignedLongValue) - let object = value.unsignedLongValue + let object = UInt(value.unsignedLongValue) storage.lock(tuple.1) // If no one else populated the cache, do that now. if storage.get(key, hashValue: tuple.1) == nil { storage.set(key, hashValue: tuple.1, value: object) } storage.unlock(tuple.1) - fetchedValue = UInt(object) + fetchedValue = object } else { storage.lock(tuple.1) // If no one else populated the cache, do that now.