Files
swift-mirror/tools/SourceKit/lib/SwiftLang/SwiftDocSupport.cpp
Slava Pestov bffce661c8 SourceKit: Don't call subst() with generic parameters that don't exist in the SubstitutionMap
Hack around this instead by using the two-function form of subst(),
and checking if the generic parameter is valid in the signature.

This comes up because we're using the generic signature of the
nominal type to get a SubstitutionMap, and then applying this map
to the types in the generic requirements of a member. If the member
introduces its own generic parameters, some of those requirements
might not be valid types in the outer generic signature.

This can probably use SubstitutionMap::combineSubstitutionMaps()
instead, but it would require more refactoring than I'm willing
to undertake for now.
2021-08-24 16:26:19 -04:00

54 KiB