# HG changeset patch # User Paul Boddie # Date 1478910964 -3600 # Node ID 9633900a122083fa67f370e2d600b31fad55b71d # Parent 8a92552d212d72bd3ceaa52dd9df4553815b2788 Retain alias information for invoked objects, providing correct origin details for instances imported from other modules. diff -r 8a92552d212d -r 9633900a1220 resolving.py --- a/resolving.py Fri Nov 11 17:53:06 2016 +0100 +++ b/resolving.py Sat Nov 12 01:36:04 2016 +0100 @@ -124,8 +124,10 @@ "Convert the given invocation 'ref', handling instantiation." + alias = ref.get_name() ref = self.importer.identify(ref.get_origin()) - return ref and ref.has_kind("") and ref.instance_of() or Reference("") + ref = ref and ref.has_kind("") and ref.instance_of() or Reference("") + return ref and ref.alias(alias) or None def resolve_accesses(self, path, name, ref):