Reflection does not work with overload methods?


#1
class MyClass {
    fun myMethod(value: String) {}
    fun myMethod(value: Int) {}
    fun anotherMethod() {
        MyClass().myMethod(1) // OK
        MyClass().myMethod("1") // OK
        MyClass::anotherMethod.toString() // OK

        // **Error: Overload resolution ambiguity**
        // How to refer to myMethod(value: Int)?
        MyClass::myMethod.toString()

        // https://developer.android.com/reference/android/support/v4/app/Fragment.html#onAttach(android.app.Activity)
        // https://developer.android.com/reference/android/support/v4/app/Fragment.html#onAttach(android.content.Context)
        // **Why the onAttach(android.app.Activity) is referred and no compile error here?**
        // How to refer to onAttach(android.content.Context)?
        android.support.v4.app.Fragment::onAttach.toString()
    }
}

Could someone help me solve the 2 problems in the example code above?