[Serialization] Don't look at extension members when resolving XREFs.

This is mostly a "don't crash" commit, but since member XREFs don't
specify which module they're looking in, they can actually pick up
members from the module currently being compiled...which may not have
a type yet.

rdar://problem/21071045

Swift SVN r30895
This commit is contained in:
Jordan Rose
2015-08-01 00:37:45 +00:00
parent 91d182154f
commit cd3d98c10c
4 changed files with 28 additions and 0 deletions

View File

@@ -982,6 +982,8 @@ static void filterValues(Type expectedTy, Module *expectedModule,
[=](ValueDecl *value) {
if (isType != isa<TypeDecl>(value))
return true;
if (!value->hasType())
return true;
if (canTy && value->getInterfaceType()->getCanonicalType() != canTy)
return true;
// FIXME: Should be able to move a value from an extension in a derived