Open JSAbrahams opened 4 years ago
The type checker currently cannot handle varargs
Treat varargs as iterables by checking that they define the __iter()__ method
__iter()__
Check that vararg arguments define the __iter()__ method. Treat these variables are iterable of the argument type.
def f(integers: *Int) => # integers has type set_iterator[Int] # integer has type Int for integer in integers do print integer + 10
Current Issue
The type checker currently cannot handle varargs
High-level description of the feature
Treat varargs as iterables by checking that they define the
__iter()__
methodDescription of potential implementation
Check that vararg arguments define the
__iter()__
method. Treat these variables are iterable of the argument type.