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:
Alexander Udalov
2016-06-28 15:31:30 +03:00
parent f290f1be68
commit b44f060ffa
9 changed files with 74 additions and 15 deletions
@@ -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)
}
@@ -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
}
}