I have a set of extension methods for sorting and filtering arrays of objects.
The signature of the extension function Sort looks like this:
Sub Sort(Extends objects() As Object, sortDescriptors() As SortDescriptor)
The compiler stops with the following error:
The expected delegate is the comparator function Sort(sortMethod As Delegate).
Overloading works for example if I rename the extension functions like this:
Sub SortX(Extends objects() As Object, sortDescriptors() As SortDescriptor) // Sort only
Sub SortX(Extends objects() As Object, sortDescriptors() As SortDescriptor, root As Predicate) // Sort and filter
Why does overloading the built-in Sort function not work, while overlaoding works for self-defined extension functions? Is this just an edge case bug and something to report in Feedback or is it by design?