mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add a 'current module' parameter to lookupVisibleDecls() so that it can do what
is documented: look up members of a type that are visible from a specific module. It does not matter much now, but when we have access control, it will. Before this change, lookupVisibleDecls() tried to guess the *defining* module of the type, and gave up if it could not. It forced us to duplicate some lookup logic for some types (archetypes and protocol compositions). Also add a test that lookup finds members of archetype's superclass, which the original (duplicated) code did not handle. Swift SVN r6363
This commit is contained in:
@@ -545,7 +545,7 @@ public:
|
||||
}
|
||||
}
|
||||
if (!Done) {
|
||||
lookupVisibleDecls(*this, ExprType);
|
||||
lookupVisibleDecls(*this, ExprType, *CurrDeclContext->getParentModule());
|
||||
}
|
||||
// Add the special qualified keyword 'metatype' so that, for example,
|
||||
// 'Int.metatype' can be completed.
|
||||
|
||||
Reference in New Issue
Block a user