kotlin用super<>解决类继承接口函数名相同
interface IA {fun test() {println("I A")}
}interface IB {fun test() {println("I B")}
}class MyClass : IA, IB {override fun test() {//重点//如果重载IA接口则 super<IA>.test()super<IB>.test()}
}fun main(args: Array<String>) {MyClass().test()
}
输出:
I B