Closed LuKuangChen closed 2 years ago
4f1b313 2021-07-26
# constructor_args_static.py class Person: def __init__(self, name, age): pass def main(): p1 = Person('Alice', 21, False) return p1
The program terminates without errors.
We expected a compile-time error because the Person constructor (__init__) accepts only 2 arguments, but was given 3.
Person
__init__
Fixed with a6a0dcbc588de4cea63e8d20d976bfda0fd7a55a
What version of Static Python are you using?
4f1b313 2021-07-26
What program did you run?
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.