Accept (and prefer) "import type" as a scoped import for any non-protocol type.

Previously this was spelled "import typealias", and that spelling will
continue to be allowed (since someone may specifically be importing a
typealias and want that to match), but now that 'type' is a keyword,
"import type" is the right way to spell the generic "import any type"
scoped import.

Swift SVN r14488
This commit is contained in:
Jordan Rose
2014-02-27 23:46:06 +00:00
parent 7ac2c1de2f
commit 1fe8630bcd
5 changed files with 10 additions and 8 deletions

View File

@@ -321,7 +321,7 @@ void DerivedFileUnit::lookupValue(Module::AccessPathTy accessPath,
// If this import is specific to some named type or decl ("import Swift.int")
// then filter out any lookups that don't match.
if (accessPath.size() == 1 && accessPath.front().first != Name)
if (accessPath.size() == 1 && accessPath.front().first != name)
return;
if (name == DerivedDecl->getName())