Allow type checking qualified references to generic nominals with free type

variables

This change allows the type checker to create member references to generic
nominals with free type variables -- see tests.  This is important for code
completion, for example, swift.Dictionary.#^A^#

Fixes rdar://15980316


Swift SVN r14461
This commit is contained in:
Dmitri Hrybenko
2014-02-27 14:40:28 +00:00
parent f8026519f4
commit 54a39dfeb8
4 changed files with 17 additions and 7 deletions

View File

@@ -915,6 +915,7 @@ Optional<ConformanceEntry> ASTContext::getConformsTo(CanType type,
void ASTContext::setConformsTo(CanType type, ProtocolDecl *proto,
ConformanceEntry entry) {
assert(!type->is<GenericTypeParamType>());
auto arena = getArena(type->getRecursiveProperties());
auto &conformsTo = Impl.getArena(arena).ConformsTo;
conformsTo[{type, proto}] = entry;