mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user