title: Subclass method not getting resolved
body: <p>I have the following structure:</p>
  <pre><code>import abc
  
  
  class AbstractParent:
      pass
  
  class AbstractChild(AbstractParent):
      @abc.abstractmethod
      def foo(self):
          raise NotImplementedError()
  
  class Child(AbstractChild):
      def foo(self):
          print('!')
  
  class A:
      def __init__(self, x: AbstractParent):
          self.x = x
  
  class B(A):
      def __init__(self, x: Child):
          super().__init__(x=x)
      
      def test(self):
          return self.x.foo()      # Unresolved attribute reference 'foo' for class 'AbstractParent'
  </code></pre>
  <p>What I would expect is that since <code>Child</code> is a subclass of <code>AbstractParent</code> and <code>Child</code> has a method <code>foo</code>, and since <code>x</code> is being declared as a <code>Child</code> in class <code>B</code>, that <code>foo</code> is able to be resolved as a method of <code>Child</code>.</p>
  <p>Instead Pycharm has a visual warning <code>Unresolved attribute reference 'foo' for class 'AbstractParent'</code>
  Why isn't it able to figure out that <code>x</code> is a <code>Child</code> which has method <code>foo</code>?</p>
  <p>Note that setting <code>self.x = x</code> in <code>B</code> fixes the issue. Is this a bug?</p>