Let’s say I’ve got two methods overloaded like this:
Public Function Test(input as Integer) As Integer
Return 1
End Function
Public Function Test(input as Integer) As String
Return "STRING"
End Function
Then elsewhere I try:
var i as integer = Test(1)
It fails compiling with “There is more than one method with this name but this does not match any of the available signatures.”
I’m clearly trying to assign the output to an integer. Shouldn’t it be smart enough to know that since I’m requesting an integer it should use the integer-returning version of the method?