Intellisense and class methods

Jul 18, 2013 at 2:51 AM
I have something like this:
class A(object):

    @classmethod
    def factory(cls, param):
        # Do some stuff...
        return cls(param)

class B(A)
    def SomeMethod()
        pass
Now in my code, I do this:
x = B.factory()
Intellisense insists that x is an A and not a B, and refuses to give me completion for SomeMethod() on x.

When running, it's clear the object is a B.

This is making it extremely hard for me to be productive, since a large portion of our codebase is based on these factory methods.

Any ideas?
Coordinator
Jul 18, 2013 at 4:27 AM
Right now, that's "by design", so clearly the design needs to be fixed. I'll create an issue and see about sorting this out.
Coordinator
Jul 18, 2013 at 4:27 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.