diff --git a/Sources/Factory/Factory/Key.swift b/Sources/Factory/Factory/Key.swift index f4ec9ec0..95f8d7cc 100644 --- a/Sources/Factory/Factory/Key.swift +++ b/Sources/Factory/Factory/Key.swift @@ -104,7 +104,7 @@ private func globalIdentifier(for type: Any.Type) -> ObjectIdentifier { return knownID } // this is what we're bypassing. extremely slow runtime function. - let name = String(reflecting: type) + let name = _typeName(type, qualified: true) // magic happens here, if name is already known then get original key for it let id = globalNameToIdentifierTable[name, default: requestedTypeID] // and save it so we don't have to do this again diff --git a/Sources/FactoryKit/FactoryKit/Key.swift b/Sources/FactoryKit/FactoryKit/Key.swift index f4ec9ec0..95f8d7cc 100644 --- a/Sources/FactoryKit/FactoryKit/Key.swift +++ b/Sources/FactoryKit/FactoryKit/Key.swift @@ -104,7 +104,7 @@ private func globalIdentifier(for type: Any.Type) -> ObjectIdentifier { return knownID } // this is what we're bypassing. extremely slow runtime function. - let name = String(reflecting: type) + let name = _typeName(type, qualified: true) // magic happens here, if name is already known then get original key for it let id = globalNameToIdentifierTable[name, default: requestedTypeID] // and save it so we don't have to do this again