You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an issue where the code is not behaving as expected when calling a method in a class.
Here is the relevant code:
a.codon
classA(object):
pass
test.codon
fromaimportAclassB(object):
defsay_hello(self):
print('hello, world from A')
deftest():
a=B()
a.say_hello()
test()
The code is using a class B that has a method named say_hello, but the method is being recognized as a function from a module a instead of the method in class B. The error message test.codon:9:2-15: error: say_hello() missing 1 required positional argument: 's' is indicating that the method say_hello is being recognized as the function say_hello from module a that requires a positional argument s.
Steps to reproduce:
Run codon run test.codon.
Expected behavior:
The expected output is:
hello, world from A
Actual behavior:
The actual output is:
test.codon:9:2-15: error: say_hello() missing 1 required positional argument: 's'
╰─ test.codon:11:1-5: error: during the realization of test()
The text was updated successfully, but these errors were encountered:
I am encountering an issue where the code is not behaving as expected when calling a method in a class.
Here is the relevant code:
a.codon
test.codon
The code is using a class
B
that has a method namedsay_hello
, but the method is being recognized as a function from a modulea
instead of the method in classB
. The error messagetest.codon:9:2-15: error: say_hello() missing 1 required positional argument: 's'
is indicating that the methodsay_hello
is being recognized as the functionsay_hello
from modulea
that requires a positional arguments
.Steps to reproduce:
codon run test.codon
.Expected behavior:
The expected output is:
Actual behavior:
The actual output is:
The text was updated successfully, but these errors were encountered: