Skip to content

Commit f567346

Browse files
authored
Merge pull request #23639 from slavapestov/mangle-type-alias-constrained-extension-5.1-early
ASTMangler: Fix mangling of type aliases in fully-constrained extensions
2 parents 9dc97ab + 7317234 commit f567346

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

lib/AST/ASTMangler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ void ASTMangler::appendType(Type type) {
793793
return appendType(aliasTy->getSinglyDesugaredType());
794794
}
795795

796-
if (aliasTy->getSubstitutionMap().hasAnySubstitutableParams()) {
796+
if (aliasTy->getSubstitutionMap()) {
797797
// Try to mangle the entire name as a substitution.
798798
if (tryMangleTypeSubstitution(tybase))
799799
return;

test/DebugInfo/typealias.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,10 @@ public func usesGeneric(y: (GenericAlias<Int>, GenericClass<Int>, GenericAlias<I
101101
let x = y
102102
markUsed(x)
103103
}
104+
105+
public struct Ox<T> {}
106+
extension Ox where T == Int {
107+
public typealias Plow = Int
108+
}
109+
110+
var v: Ox<Int>.Plow = 0

0 commit comments

Comments
 (0)