mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add lookupClassMembers for use in id-style dynamic lookup.
With this, we can now get a list of all class members* available in the current translation unit, which will be necessary for doing id-style dynamic lookup (inferring which method you're referring to when the base type is some magic "dynamic lookup" type). * Including members of protocols, since a class we don't know about could have implemented the protocol. Since there is no code currently using this, I've added a new mode to swift-ide-test to just dump all class members -- what will eventually happen when you code complete on a dynamic lookup type. This mode will go away once the other pieces of id-style lookup are in place. Swift SVN r7287
This commit is contained in:
@@ -347,6 +347,12 @@ public:
|
||||
///
|
||||
/// Note that this may cause other decls to load as well.
|
||||
void loadDeclsConformingTo(KnownProtocolKind kind);
|
||||
|
||||
/// Reports all class members in the module to the given consumer.
|
||||
///
|
||||
/// This is intended for use with id-style lookup and code completion.
|
||||
void lookupClassMembers(Module::AccessPathTy accessPath,
|
||||
VisibleDeclConsumer &consumer);
|
||||
};
|
||||
|
||||
class SerializedModule : public LoadedModule {
|
||||
|
||||
Reference in New Issue
Block a user