Circular parameter reference not checked for assignment
I wanted to check if this was a bug or desired.
Usually when you reference a parameter within its own default value (optional positional or optional keyword) it raises a syntax error. This is unless you use it in an assignment, in which case it is not checked. Is this desired? Here's an example:
def foo(bar = bar = 1); end
def foo(bar: bar = 1); end
I'm not sure what this code is supposed to be doing. I expected it to raise a syntax error.