Thanks for reporting this.
I think this is normal Objo behaviour rather than a compiler bug. Objo treats a method’s signature as its name plus its parameter types. The return type is not part of the overload signature, so these two methods conflict:
Sub MyMethod(x As Integer)
Function MyMethod(x As Integer) As Boolean
Although Xojo allows this in some cases, supporting it in Objo would make overload resolution more complicated and potentially ambiguous. For example, Objo allows a function call to be used as a standalone statement, with the return value ignored which Xojo does not:
MyMethod(123)
If both a Sub and a Function with the same parameter signature existed, the compiler would need an extra rule to decide which one that call means. Objo does not currently have a Xojo-style Call keyword to make that distinction explicit.
So for now, Objo requires overloads to differ by parameter count or parameter type, not only by return type. The workaround is to give one method a different name, or make the parameter signature different.
I’ll improve the diagnostic in the next release so this is clearer, e.g. “Objo overloads by parameter types only; return type is not part of the method signature.”