A use case for contextual parameters mixed with overloads is currently not possible.
def f(x: Int) = "a"
def f(x: (n: Int) ?=> Int) = "b"
f(10) // "a" - selects the first overload
f(n * 3) // error - Not found 'n'
I didn’t expect this result. I expected f(n * 3) = "b". I think it would be reasonable for the compiler to assume the first overload in the absence of any occurence of n, but select the second overload when n is in the expression.
They must be overloads, because in my use cases it is important that the base function has different behavior.