Skip to content

Commit 68b0d13

Browse files
committed
ASTMangler: Fix mangling of type aliases in fully-constrained extensions
We should still mangle these as generic types. Fixes <rdar://problem/47980487>.
1 parent a4cccaf commit 68b0d13

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
@@ -761,7 +761,7 @@ void ASTMangler::appendType(Type type) {
761761
return appendType(aliasTy->getSinglyDesugaredType());
762762
}
763763

764-
if (aliasTy->getSubstitutionMap().hasAnySubstitutableParams()) {
764+
if (aliasTy->getSubstitutionMap()) {
765765
// Try to mangle the entire name as a substitution.
766766
if (tryMangleTypeSubstitution(tybase))
767767
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)