Do not consider fake variables for objects in :: resolution
The main change is in NewResolutionOldInference.ResolutionKind.CallableReference, where createVariableProcessor creates a processor which no longer lists objects #KT-12322 Fixed
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// !CHECK_TYPE
|
||||
// KT-12322 Overload resolution ambiguity with constructor references when class has a companion object
|
||||
|
||||
class Foo {
|
||||
companion object
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val a = ::Foo
|
||||
checkSubtype<() -> Foo>(a)
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public final class Foo {
|
||||
public constructor Foo()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user