Consider the following module.
bool b(int _x) = false;
bool b(int _x, int _y) = false;
void foo(bool(int) f = b) { println(f(1)); }
void main() {
hoi(); //executes (the matching overload of `b` is executed)
hoi(f=b); //throws UnexpectedType: "Expected bool (int), but got value"
}
The interpreter exhibits different behavior when a (dynamically value-typed) overloaded function is used as a keyword argument in a default setting and as an explicit argument.
Expected behavior
The function as a default parameter should not execute successfully when it does not as an explicitly provided argument.
Desktop (please complete the following information):
- Context: VS Code extension 0.13.0