Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Analysis of return values does not work with forward references #294

Closed

Description

Properties.py:

class A(object):
    def methodA(self):
        return 's'

class B(object):
    def getA(self):
        return self.propA

    @property
    def propA(self):
        return A()

Code:

x = B().getA().methodA()

x is nothing. This is b/c after AST walker processes class it processes functions in queue order and property propA is not yet known when return type of getA is analyzed.

Code needs to use delayed resolution or relocation tables.

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions