Files
kotlin-fork/compiler/testData/diagnostics/tests/j+k/selectMoreSpecific.txt
T
Denis Zharkov 62a55b7b00 Fix false-positive resolution ambiguity when using akka
com.typesafe.akka:akka-cluster-sharding_2.12:2.5
akka.cluster.sharding.ClusterSharding  has the following methods:

    public static ClusterSharding get(ActorSystem var0) {
        return ClusterSharding$.MODULE$.get(var0);
    }

    public static Extension get(ActorSystem var0) {
        return ClusterSharding$.MODULE$.get(var0);
    }

NB: ClusterSharding  <: Extension
None of these methods is synthetic or something, but javac allows
calls like ClusterSharding.get(null)  and they get resolved
to the first method returning ClusterSharding

It seems that both javac and IntelliJ resolution algorithms filter out
such clashing declarations choosing the one that has the most
specific return type, the same idea is applied in the change

 #KT-17560 Fixed
2017-04-24 17:54:01 +03:00

15 lines
465 B
Plaintext
Vendored

package
public fun foo(/*0*/ a: A): kotlin.Unit
public open class A {
public constructor A()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open fun foo(): kotlin.String!
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
// Static members
public open fun bar(): kotlin.String!
}