Removing the one with the bool would be a binary breaking change.
The new [OverloadResolutionPriority] attribute allows to reduce the priority such that the C# compiler will prefer the one with the optional argument instead.
This means that calls like Debug.Assert(c >= 0) will now bind to Debug.Assert(bool, message) with the C# compiler helpfully providing the message by using the expression used for the bool parameter.
Comments
I'm also wondering when someone will use it for evil, nefarious purposes. But that's true of any language feature, like:
public static class var;
global using int = System.Int64;
More subtle π
We modified the parameter for the string message to let the C# compiler fill it in with the expression of the bool.
The problem is this overload wouldn't be picked because one with just the bool already exist.
The new [OverloadResolutionPriority] attribute allows to reduce the priority such that the C# compiler will prefer the one with the optional argument instead.
Neat!