rascal icon indicating copy to clipboard operation
rascal copied to clipboard

Wrong warning "unknown keyword argument"

Open linuswagner opened this issue 2 years ago • 1 comments

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?

linuswagner avatar Nov 27 '23 16:11 linuswagner

Also thanks Lisa for observing the warning in the first place!

linuswagner avatar Nov 27 '23 16:11 linuswagner