rascal
rascal copied to clipboard
Wrong warning "unknown keyword argument"
When I execute the following lines:
import Node;
getKeywordParameters("f"(10, "abc", height=0));
I get
Warning: calling function with extra unknown keyword argument: height
map[str, value]: ("height":0)
The warning comes from interprete(), specifically here.
The way I understand the code through the debugger, kwFormals is something empty-like, so the whole outer if around the warning should be skipped. However, the check fails and evaluates to true.
Did I spot the bug correctly?
Also thanks Lisa for observing the warning in the first place!