caterinaurban/Lyra

[Bug] Bug with classes

Closed this issue · 1 comments

The current inference allows class methods to be called as normal calls with passing the first argument as the class instance.

For example, the current is allowed (which shouldn't be)

class A:
    def f(self):
         instance = A()
         return f(instance)

And accordingly, the following is not allowed (Which should be):

def f():
     return 1

class A:
    def f(self):
         return f()

Because the inference confuses the function call f() with the method f(self)

This issue was moved to caterinaurban/Typpete#3