Code complete expressions that type check to ArchetypeTypes

This required fixing a bug in lookupVisibleDecls(), which did not return any
results for ArchetypeTypes.


Swift SVN r6310
This commit is contained in:
Dmitri Hrybenko
2013-07-16 23:49:25 +00:00
parent 36dd7bfa84
commit 858ce26b2b
2 changed files with 13 additions and 4 deletions

View File

@@ -539,7 +539,9 @@ public:
}
}
if (!Done) {
lookupVisibleDecls(*this, ExprType);
// Use a canonical type here to ensure that we get ArchetypeTypes instead
// of IdentifierTypes.
lookupVisibleDecls(*this, ExprType->getCanonicalType());
}
// Add the special qualified keyword 'metatype' so that, for example,
// 'Int.metatype' can be completed.