diff --git a/lib/Sema/TypeCheckDecl.cpp b/lib/Sema/TypeCheckDecl.cpp index caa3bf87a9b8..dd62ac9ac42b 100644 --- a/lib/Sema/TypeCheckDecl.cpp +++ b/lib/Sema/TypeCheckDecl.cpp @@ -3068,10 +3068,10 @@ ExtendedTypeRequest::evaluate(Evaluator &eval, ExtensionDecl *ext) const { if (auto *aliasDecl = dyn_cast(unboundGeneric->getDecl())) { auto underlyingType = aliasDecl->getUnderlyingType(); if (auto extendedNominal = underlyingType->getAnyNominal()) { - return TypeChecker::isPassThroughTypealias( - aliasDecl, extendedNominal) - ? extendedType - : extendedNominal->getDeclaredType(); + // Return the typealias type itself to preserve specialization info. + // Previously we returned the nominal's declared type which lost + // information about partial type specialization. See Issue #68212. + return extendedType; } if (underlyingType->is()) {