wala / ML

Eclipse Public License 2.0
23 stars 17 forks source link

Properties don't appear in the call graph #121

Open khatchad opened 7 months ago

khatchad commented 7 months ago

Consider the following example:

class Test:
    def __init__(self, value):
        self.__value = value

    @property
    def value(self):
        return self.__value

    @value.setter
    def name(self, number):
        self.__value = number

if __name__ == "__main__":
    k = Test(1)
    print(k.value)  # using getter
    k.name = 2  # using setter
    print(k.value)  # using getter

There is no CG node for Test.value(), which means that print(k.value) is not dispatching to the property definition.