Intellisense and class methods

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

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

class B(A)
    def SomeMethod()
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?
Jul 18, 2013 at 5: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.
Jul 18, 2013 at 5:27 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.