diff --git a/SourceryRuntime/Sources/Common/Composer/ParserResultsComposed.swift b/SourceryRuntime/Sources/Common/Composer/ParserResultsComposed.swift index a919529e8..ef6cde026 100644 --- a/SourceryRuntime/Sources/Common/Composer/ParserResultsComposed.swift +++ b/SourceryRuntime/Sources/Common/Composer/ParserResultsComposed.swift @@ -55,7 +55,12 @@ internal struct ParserResultsComposed { /// Map associated types associatedTypes.forEach { - typeMap[$0.key] = $0.value.type + if let globalName = $0.value.type?.globalName, + let type = typeMap[globalName] { + typeMap[$0.key] = type + } else { + typeMap[$0.key] = $0.value.type + } } types = unifyTypes()