Ignore resolution to function without arguments on LHS of '::'
In the expression "Runnable::run" we were resolving the left-hand side to the SAM constructor of Runnable. Now we detect this situation, ignore the result of such resolution, and continue resolving the LHS as a type
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
// FILE: Foo.kt
|
||||
|
||||
package test
|
||||
|
||||
class Foo {
|
||||
fun bar() {}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
import test.Foo
|
||||
|
||||
fun Foo(): String = ""
|
||||
|
||||
val f = Foo::bar
|
||||
val g = Foo::<!UNRESOLVED_REFERENCE!>length<!>
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package
|
||||
|
||||
public val f: kotlin.reflect.KFunction1<test.Foo, kotlin.Unit>
|
||||
public val g: [ERROR : Type for Foo::length]
|
||||
public fun Foo(): kotlin.String
|
||||
|
||||
package test {
|
||||
|
||||
public final class Foo {
|
||||
public constructor Foo()
|
||||
public final fun bar(): kotlin.Unit
|
||||
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