This fixes the error by not using the parameter default, so it's not a breaking bug:
I am wondering if this is intended to prevent bad practice, or some side effect of 4.0 being more compiled, or an actual bug. I have also noticed that you similarly can't have non-constant values in a match statement, and I am curious about the reasoning.
That sounds normal. That is how it is in C++ and other languages.
Yeah, just not how it was in 3.3 and Python, iirc.