From 73172345f73fab9549258203e1efcdc5a921d460 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Wed, 13 Feb 2019 19:16:46 -0500 Subject: [PATCH] ASTMangler: Fix mangling of type aliases in fully-constrained extensions We should still mangle these as generic types. Fixes . --- lib/AST/ASTMangler.cpp | 2 +- test/DebugInfo/typealias.swift | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/AST/ASTMangler.cpp b/lib/AST/ASTMangler.cpp index 4fc2e873834c3..cd7ea4224dacc 100644 --- a/lib/AST/ASTMangler.cpp +++ b/lib/AST/ASTMangler.cpp @@ -793,7 +793,7 @@ void ASTMangler::appendType(Type type) { return appendType(aliasTy->getSinglyDesugaredType()); } - if (aliasTy->getSubstitutionMap().hasAnySubstitutableParams()) { + if (aliasTy->getSubstitutionMap()) { // Try to mangle the entire name as a substitution. if (tryMangleTypeSubstitution(tybase)) return; diff --git a/test/DebugInfo/typealias.swift b/test/DebugInfo/typealias.swift index 25f3c8750cef1..7ffab3479cf5c 100644 --- a/test/DebugInfo/typealias.swift +++ b/test/DebugInfo/typealias.swift @@ -101,3 +101,10 @@ public func usesGeneric(y: (GenericAlias, GenericClass, GenericAlias {} +extension Ox where T == Int { + public typealias Plow = Int +} + +var v: Ox.Plow = 0 \ No newline at end of file