Static Python allows passing too many arguments to `__init__`
LuKuangChen opened this issue · comments
KC Lu commented
What version of Static Python are you using?
4f1b313
2021-07-26
What program did you run?
# constructor_args_static.py
class Person:
def __init__(self, name, age):
pass
def main():
p1 = Person('Alice', 21, False)
return p1
What happened?
The program terminates without errors.
What should have happened?
We expected a compile-time error because the Person
constructor (__init__
) accepts only 2 arguments, but was given 3.
Dino Viehland commented
Fixed with a6a0dcb