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

@@ -650,6 +650,8 @@ void ValueDecl::overwriteType(Type T) {
DeclContext *ValueDecl::getPotentialGenericDeclContext() {
if (auto func = dyn_cast<AbstractFunctionDecl>(this))
return func;
if (auto NTD = dyn_cast<NominalTypeDecl>(this))
return NTD;
return getDeclContext();
}