Use the new type inference for top-level callable reference resolution
^KT-47797 Fixed ^KT-47987 Fixed ^KT-45034 Fixed ^KT-48446 Fixed ^KT-13934 Fixed
This commit is contained in:
+13
@@ -19,8 +19,21 @@ val j1: J<String> = Impl("O")
|
||||
// would produce an error.
|
||||
val x by j1::value
|
||||
|
||||
@Target(AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.EXPRESSION, AnnotationTarget.FILE)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class Anno
|
||||
|
||||
fun box(): String {
|
||||
val j2: J<String> = Impl("K")
|
||||
val y by j2::value
|
||||
val y1 by @Anno j2::value
|
||||
val y2 by (j2::value)
|
||||
val y3 by (j2)::value
|
||||
val y4 by ((j2)::value)
|
||||
val y5 by (((j2)::value))
|
||||
val y6 by @Anno() (((j2)::value))
|
||||
val y7 by (@Anno() ((j2)::value))
|
||||
val y8 by ((@Anno() (j2)::value))
|
||||
val y9 by @Anno() ((@Anno() (j2)::value))
|
||||
return x + y
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
fun box(): String {
|
||||
val z = "K"
|
||||
open class A(val x: String) {
|
||||
|
||||
+1
-1
@@ -37,5 +37,5 @@ fun test() {
|
||||
val r7 = c::foo
|
||||
checkSubtype<() -> String>(r7)
|
||||
|
||||
C::<!UNRESOLVED_REFERENCE!>bar<!>
|
||||
C::bar
|
||||
}
|
||||
|
||||
+5
-5
@@ -6,10 +6,10 @@ public interface J {
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun f1(x: Int?): Any = x::<!UNSAFE_CALL!>hashCode<!>
|
||||
fun <T> f2(t: T): Any = t::<!UNSAFE_CALL!>hashCode<!>
|
||||
fun <S : String?> f3(s: S): Any = s::<!UNSAFE_CALL!>hashCode<!>
|
||||
fun <U : Any> f4(u: U?): Any = u::<!UNSAFE_CALL!>hashCode<!>
|
||||
fun f5(c: List<*>): Any = c[0]::<!UNSAFE_CALL!>hashCode<!>
|
||||
fun f1(x: Int?): Any = x::<!TYPE_MISMATCH, UNSAFE_CALL!>hashCode<!>
|
||||
fun <T> f2(t: T): Any = t::<!TYPE_MISMATCH, UNSAFE_CALL!>hashCode<!>
|
||||
fun <S : String?> f3(s: S): Any = s::<!TYPE_MISMATCH, UNSAFE_CALL!>hashCode<!>
|
||||
fun <U : Any> f4(u: U?): Any = u::<!TYPE_MISMATCH, UNSAFE_CALL!>hashCode<!>
|
||||
fun f5(c: List<*>): Any = c[0]::<!TYPE_MISMATCH, UNSAFE_CALL!>hashCode<!>
|
||||
|
||||
fun f6(j: J): Any = j.platformString()::hashCode
|
||||
|
||||
+3
-3
@@ -18,9 +18,9 @@ class Test {
|
||||
val <T> List<T>.b: Int? get() = size
|
||||
|
||||
fun <T> List<T>.testCallable1(): () -> Unit = <!RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS!>a<T><!>::foo
|
||||
fun <T> List<T>.testCallable2(): () -> Unit = <!RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS!>b<!>?::<!UNSAFE_CALL!>foo<!>
|
||||
fun <T> List<T>.testCallable3(): () -> Unit = <!RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS!>b<T, Any><!>::<!UNSAFE_CALL!>foo<!>
|
||||
fun <T> List<T>.testCallable4(): () -> Unit = <!RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS!>b<T><!>?::<!UNSAFE_CALL!>foo<!>
|
||||
fun <T> List<T>.testCallable2(): () -> Unit = <!RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS!>b<!>?::<!TYPE_MISMATCH, UNSAFE_CALL!>foo<!>
|
||||
fun <T> List<T>.testCallable3(): () -> Unit = <!RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS!>b<T, Any><!>::<!TYPE_MISMATCH, UNSAFE_CALL!>foo<!>
|
||||
fun <T> List<T>.testCallable4(): () -> Unit = <!RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS!>b<T><!>?::<!TYPE_MISMATCH, UNSAFE_CALL!>foo<!>
|
||||
|
||||
fun <T> List<T>.testClassLiteral1() = <!RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS!>a<T><!>::class
|
||||
fun <T> List<T>.testClassLiteral2() = <!EXPRESSION_OF_NULLABLE_TYPE_IN_CLASS_LITERAL_LHS, RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS!>b<!>?::class
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@ package test
|
||||
fun nullableFun(): Int? = null
|
||||
fun Int.foo() {}
|
||||
|
||||
val test1 = <!RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS!>nullableFun()<!>?::<!UNSAFE_CALL!>foo<!>
|
||||
val test1 = <!RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS!>nullableFun()<!>?::<!TYPE_MISMATCH, UNSAFE_CALL!>foo<!>
|
||||
|
||||
+3
@@ -1,8 +1,11 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun <K> id(x: K) = x
|
||||
|
||||
class A1 {
|
||||
fun <T> a1(t: T): Unit {}
|
||||
fun test1(): (String) -> Unit = A1()::a1
|
||||
fun test2(): (String) -> Unit = id(A1()::a1)
|
||||
}
|
||||
|
||||
class A2 {
|
||||
|
||||
+4
-1
@@ -1,8 +1,11 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun <K> id(x: K) = x
|
||||
|
||||
class A1 {
|
||||
fun <T> a1(t: T): Unit {}
|
||||
fun test1(): (String) -> Unit = A1()::a1
|
||||
fun test2(): (String) -> Unit = id(A1()::a1)
|
||||
}
|
||||
|
||||
class A2 {
|
||||
@@ -19,6 +22,6 @@ class A3<T> {
|
||||
fun test2(): (T) -> Unit = A3<T>()::a3
|
||||
fun test3(): (Int) -> String = A3<Int>()::a3
|
||||
|
||||
fun <R> test4(): (R) -> Unit = <!TYPE_MISMATCH!>this::<!TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR!>a3<!><!>
|
||||
fun <R> test4(): (R) -> Unit = this::<!TYPE_MISMATCH!>a3<!>
|
||||
fun <R> test5(): (T) -> R = this::a3
|
||||
}
|
||||
+3
@@ -1,11 +1,14 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ K> id(/*0*/ x: K): K
|
||||
|
||||
public final class A1 {
|
||||
public constructor A1()
|
||||
public final fun </*0*/ T> a1(/*0*/ t: T): 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 final fun test1(): (kotlin.String) -> kotlin.Unit
|
||||
public final fun test2(): (kotlin.String) -> kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -5,5 +5,5 @@ class Foo {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
Foo::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar<!> <!SYNTAX!>< <!DEBUG_INFO_MISSING_UNRESOLVED!>Int<!> ><!> <!SYNTAX!>(2 <!DEBUG_INFO_MISSING_UNRESOLVED!>+<!> 2)<!>
|
||||
Foo::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar<!> <!SYNTAX!>< <!DEBUG_INFO_MISSING_UNRESOLVED!>Int<!> ><!> <!SYNTAX!>(2 <!DEBUG_INFO_MISSING_UNRESOLVED!>+<!> 2)<!>
|
||||
}
|
||||
|
||||
compiler/testData/diagnostics/tests/callableReference/referenceAdaptationHasDependencyOnApi14.fir.kt
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
// !API_VERSION: 1.3
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class A {
|
||||
fun foo(s: String = "", vararg xs: Long): String = "foo"
|
||||
}
|
||||
|
||||
fun coercionToUnit(f: (A, String, LongArray) -> Unit): Any = f
|
||||
fun varargToElement(f: (A, String, Long, Long) -> String): Any = f
|
||||
fun defaultAndVararg(f: (A) -> String): Any = f
|
||||
fun allOfTheAbove(f: (A) -> Unit): Any = f
|
||||
|
||||
fun test() {
|
||||
coercionToUnit(A::foo)
|
||||
varargToElement(A::foo)
|
||||
defaultAndVararg(A::foo)
|
||||
allOfTheAbove(A::foo)
|
||||
}
|
||||
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
// !API_VERSION: 1.3
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class A {
|
||||
fun foo(s: String = "", vararg xs: Long): String = "foo"
|
||||
}
|
||||
|
||||
fun coercionToUnit(f: (A, String, LongArray) -> Unit): Any = f
|
||||
fun varargToElement(f: (A, String, Long, Long) -> String): Any = f
|
||||
fun defaultAndVararg(f: (A) -> String): Any = f
|
||||
fun allOfTheAbove(f: (A) -> Unit): Any = f
|
||||
|
||||
fun test() {
|
||||
coercionToUnit(<!TYPE_MISMATCH!>A::foo<!>)
|
||||
varargToElement(<!TYPE_MISMATCH!>A::foo<!>)
|
||||
defaultAndVararg(<!TYPE_MISMATCH!>A::foo<!>)
|
||||
allOfTheAbove(<!TYPE_MISMATCH!>A::foo<!>)
|
||||
}
|
||||
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
package
|
||||
|
||||
public fun allOfTheAbove(/*0*/ f: (A) -> kotlin.Unit): kotlin.Any
|
||||
public fun coercionToUnit(/*0*/ f: (A, kotlin.String, kotlin.LongArray) -> kotlin.Unit): kotlin.Any
|
||||
public fun defaultAndVararg(/*0*/ f: (A) -> kotlin.String): kotlin.Any
|
||||
public fun test(): kotlin.Unit
|
||||
public fun varargToElement(/*0*/ f: (A, kotlin.String, kotlin.Long, kotlin.Long) -> kotlin.String): kotlin.Any
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun foo(/*0*/ s: kotlin.String = ..., /*1*/ vararg xs: kotlin.Long /*kotlin.LongArray*/): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -26,6 +26,6 @@ fun main() {
|
||||
// It must be OK
|
||||
val x18 = String?::hashCode <!USELESS_ELVIS!>?: ::foo<!>
|
||||
val x19 = String::hashCode <!USELESS_ELVIS!>?: ::foo<!>
|
||||
val x20 = String?::<!UNSAFE_CALL!>hashCode<!>::hashCode
|
||||
val x21 = kotlin.String?::<!UNSAFE_CALL!>hashCode<!>::hashCode
|
||||
val x20 = String?::hashCode::hashCode
|
||||
val x21 = kotlin.String?::hashCode::hashCode
|
||||
}
|
||||
|
||||
compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.kt
Vendored
+1
-1
@@ -381,7 +381,7 @@ fun poll65(): Flow<String> {
|
||||
|
||||
fun poll66(): Flow<String> {
|
||||
return flow {
|
||||
val inv = ::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!>
|
||||
val inv = ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!>
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -383,7 +383,7 @@ fun poll65(): Flow<String> {
|
||||
|
||||
fun poll66(): Flow<String> {
|
||||
return flow {
|
||||
val inv = ::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!>
|
||||
val inv = ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!>
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
}
|
||||
}
|
||||
|
||||
+19
@@ -23,38 +23,57 @@ fun <T> Foo2<T>.setX(y: T): T {
|
||||
|
||||
fun Float.bar() {}
|
||||
|
||||
fun <K> id(x: K) = x
|
||||
|
||||
fun test1() {
|
||||
val fooSetRef = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo<*>, CapturedType(*), CapturedType(*)>")!>Foo<*>::setX<!>
|
||||
|
||||
val fooSetRef2 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo<*>, kotlin.Nothing, kotlin.Number>")!>id(
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo<*>, CapturedType(*), CapturedType(*)>")!>Foo<*>::setX<!>
|
||||
)<!>
|
||||
val foo = Foo<Float>(1f)
|
||||
|
||||
fooSetRef.invoke(foo, <!ARGUMENT_TYPE_MISMATCH!>1<!>)
|
||||
fooSetRef2.invoke(foo, <!ARGUMENT_TYPE_MISMATCH!>1<!>)
|
||||
|
||||
foo.x.bar()
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
val fooSetRef = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo<*>, CapturedType(*), CapturedType(*)>")!>Foo<*>::setX1<!>
|
||||
val fooSetRef2 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo<*>, kotlin.Nothing, kotlin.Number>")!>id(
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo<*>, CapturedType(*), CapturedType(*)>")!>Foo<*>::setX1<!>
|
||||
)<!>
|
||||
val foo = Foo<Float>(1f)
|
||||
|
||||
fooSetRef.invoke(foo, <!ARGUMENT_TYPE_MISMATCH!>1<!>)
|
||||
fooSetRef2.invoke(foo, <!ARGUMENT_TYPE_MISMATCH!>1<!>)
|
||||
|
||||
foo.x.bar()
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
val fooSetRef = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo2<*>, CapturedType(*), CapturedType(*)>")!>Foo2<*>::setX<!>
|
||||
val fooSetRef2 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo2<*>, kotlin.Nothing, kotlin.Any?>")!>id(
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo2<*>, CapturedType(*), CapturedType(*)>")!>Foo2<*>::setX<!>
|
||||
)<!>
|
||||
val foo = Foo2<Int>(1)
|
||||
|
||||
fooSetRef.invoke(foo, <!ARGUMENT_TYPE_MISMATCH!>""<!>)
|
||||
fooSetRef2.invoke(foo, <!ARGUMENT_TYPE_MISMATCH!>""<!>)
|
||||
|
||||
foo.x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>bar<!>()
|
||||
}
|
||||
|
||||
fun test4() {
|
||||
val fooSetRef = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo2<*>, CapturedType(*), CapturedType(*)>")!>Foo2<*>::setX1<!>
|
||||
val fooSetRef2 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo2<*>, kotlin.Nothing, kotlin.Any?>")!>id(
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo2<*>, CapturedType(*), CapturedType(*)>")!>Foo2<*>::setX1<!>
|
||||
)<!>
|
||||
val foo = Foo2<Int>(1)
|
||||
|
||||
fooSetRef.invoke(foo, <!ARGUMENT_TYPE_MISMATCH!>""<!>)
|
||||
fooSetRef2.invoke(foo, <!ARGUMENT_TYPE_MISMATCH!>""<!>)
|
||||
|
||||
foo.x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>bar<!>()
|
||||
}
|
||||
|
||||
compiler/testData/diagnostics/tests/inference/capturedTypes/approximateContravariantCapturedTypes.kt
Vendored
+21
-2
@@ -23,38 +23,57 @@ fun <T> Foo2<T>.setX(y: T): T {
|
||||
|
||||
fun Float.bar() {}
|
||||
|
||||
fun <K> id(x: K) = x
|
||||
|
||||
fun test1() {
|
||||
val fooSetRef = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo<*>, kotlin.Nothing, kotlin.Number>")!>Foo<*>::<!TYPE_MISMATCH("Nothing; Foo<*>")!>setX<!><!>
|
||||
val fooSetRef = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo<*>, kotlin.Nothing, kotlin.Number>")!>Foo<*>::<!TYPE_MISMATCH, TYPE_MISMATCH!>setX<!><!>
|
||||
|
||||
val fooSetRef2 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo<*>, kotlin.Nothing, kotlin.Number>")!>id(
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo<*>, CapturedType(*), CapturedType(*)>")!>Foo<*>::setX<!>
|
||||
)<!>
|
||||
val foo = Foo<Float>(1f)
|
||||
|
||||
fooSetRef.invoke(foo, <!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
||||
fooSetRef2.invoke(foo, <!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
||||
|
||||
foo.x.bar()
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
val fooSetRef = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo<*>, kotlin.Nothing, kotlin.Number>")!>Foo<*>::setX1<!>
|
||||
val fooSetRef2 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo<*>, kotlin.Nothing, kotlin.Number>")!>id(
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo<*>, kotlin.Nothing, kotlin.Number>")!>Foo<*>::setX1<!>
|
||||
)<!>
|
||||
val foo = Foo<Float>(1f)
|
||||
|
||||
fooSetRef.invoke(foo, <!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
||||
fooSetRef2.invoke(foo, <!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
||||
|
||||
foo.x.bar()
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
val fooSetRef = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo2<*>, kotlin.Nothing, kotlin.Any?>")!>Foo2<*>::<!TYPE_MISMATCH("Nothing; Foo2<*>")!>setX<!><!>
|
||||
val fooSetRef = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo2<*>, kotlin.Nothing, kotlin.Any?>")!>Foo2<*>::<!TYPE_MISMATCH, TYPE_MISMATCH!>setX<!><!>
|
||||
val fooSetRef2 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo2<*>, kotlin.Nothing, kotlin.Any?>")!>id(
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo2<*>, CapturedType(*), CapturedType(*)>")!>Foo2<*>::setX<!>
|
||||
)<!>
|
||||
val foo = Foo2<Int>(1)
|
||||
|
||||
fooSetRef.invoke(foo, <!TYPE_MISMATCH!>""<!>)
|
||||
fooSetRef2.invoke(foo, <!TYPE_MISMATCH!>""<!>)
|
||||
|
||||
foo.x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>bar<!>()
|
||||
}
|
||||
|
||||
fun test4() {
|
||||
val fooSetRef = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo2<*>, kotlin.Nothing, kotlin.Any?>")!>Foo2<*>::setX1<!>
|
||||
val fooSetRef2 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo2<*>, kotlin.Nothing, kotlin.Any?>")!>id(
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction2<Foo2<*>, kotlin.Nothing, kotlin.Any?>")!>Foo2<*>::setX1<!>
|
||||
)<!>
|
||||
val foo = Foo2<Int>(1)
|
||||
|
||||
fooSetRef.invoke(foo, <!TYPE_MISMATCH!>""<!>)
|
||||
fooSetRef2.invoke(foo, <!TYPE_MISMATCH!>""<!>)
|
||||
|
||||
foo.x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>bar<!>()
|
||||
}
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ K> id(/*0*/ x: K): K
|
||||
public fun test1(): kotlin.Unit
|
||||
public fun test2(): kotlin.Unit
|
||||
public fun test3(): kotlin.Unit
|
||||
|
||||
@@ -114,14 +114,14 @@ fun <T : Foo, R: Number, D: Int> main() {
|
||||
bar7(Foo::resolve) // OK
|
||||
|
||||
// with LHS and sentension function expected type
|
||||
bar10<D>(<!TYPE_MISMATCH!>Int::<!CALLABLE_REFERENCE_RESOLUTION_AMBIGUITY!>x1<!><!>) // ERROR before the fix in NI
|
||||
bar10<D>(<!TYPE_MISMATCH!>Int::x1<!>) // ERROR before the fix in NI
|
||||
bar10<Int>(Int::x1) // OK
|
||||
bar10(Int::x1) // OK
|
||||
|
||||
fun Int.ext() {
|
||||
// with LHS and sentension function expected type
|
||||
bar10<D>(::<!CALLABLE_REFERENCE_RESOLUTION_AMBIGUITY!>x1<!>) // ERROR before the fix in NI
|
||||
bar10<Int>(::<!CALLABLE_REFERENCE_RESOLUTION_AMBIGUITY!>x1<!>) // OK
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar10<!>(::<!CALLABLE_REFERENCE_RESOLUTION_AMBIGUITY!>x1<!>) // OK
|
||||
bar10<D>(<!TYPE_MISMATCH("KProperty1<TypeVariable(K), String>; KProperty0<String>")!>::x1<!>) // ERROR before the fix in NI
|
||||
bar10<Int>(<!TYPE_MISMATCH("KProperty1<TypeVariable(K), String>; KProperty0<String>")!>::x1<!>) // OK
|
||||
bar10(<!TYPE_MISMATCH("KProperty1<TypeVariable(K), String>; KProperty0<String>")!>::x1<!>) // OK
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -9,8 +9,8 @@ class Foo7<T>
|
||||
fun foo7() = null as Foo7<Int>
|
||||
|
||||
fun poll17(flag: Boolean): Any? {
|
||||
val inv = if (flag) { foo7() } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!> }
|
||||
return <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
val inv = if (flag) { <!IMPLICIT_CAST_TO_ANY!>foo7()<!> } else { <!IMPLICIT_CAST_TO_ANY!>::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!><!> }
|
||||
return inv
|
||||
}
|
||||
|
||||
fun poll26(flag: Boolean): Any? {
|
||||
@@ -24,6 +24,6 @@ fun poll36(flag: Boolean): Any? {
|
||||
}
|
||||
|
||||
fun poll56(): Any? {
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!> } catch (e: Exception) { foo7() } finally { foo7() }
|
||||
return <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
val inv = try { ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> } catch (e: Exception) { foo7() } finally { foo7() }
|
||||
return inv
|
||||
}
|
||||
|
||||
+5
@@ -18,6 +18,11 @@ class Foo6
|
||||
class Foo7<T>
|
||||
fun foo7() = null as Foo7<Int>
|
||||
|
||||
fun poll0(flag: Boolean) {
|
||||
val inv = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.Int>")!>if (flag) { ::bar2 } else { ::foo4 }<!>
|
||||
inv()
|
||||
}
|
||||
|
||||
fun poll1(flag: Boolean) {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
|
||||
+15
-10
@@ -18,6 +18,11 @@ class Foo6
|
||||
class Foo7<T>
|
||||
fun foo7() = null as Foo7<Int>
|
||||
|
||||
fun poll0(flag: Boolean) {
|
||||
val inv = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.Int>")!>if (flag) { ::bar2 } else { ::foo4 }<!>
|
||||
inv()
|
||||
}
|
||||
|
||||
fun poll1(flag: Boolean) {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
@@ -39,7 +44,7 @@ fun poll13(flag: Boolean) {
|
||||
}
|
||||
|
||||
fun poll14(flag: Boolean) {
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::bar4<!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::foo4<!> }
|
||||
val inv = if (flag) { ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar4<!> } else { ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo4<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
|
||||
@@ -54,8 +59,8 @@ fun poll16(flag: Boolean) {
|
||||
}
|
||||
|
||||
fun poll17(flag: Boolean) {
|
||||
val inv = if (flag) { foo7() } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!> }
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
val inv = if (flag) { <!IMPLICIT_CAST_TO_ANY!>foo7()<!> } else { <!IMPLICIT_CAST_TO_ANY!>::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!><!> }
|
||||
inv
|
||||
}
|
||||
|
||||
fun poll2(flag: Boolean) {
|
||||
@@ -144,7 +149,7 @@ fun poll42() {
|
||||
}
|
||||
|
||||
fun poll43() {
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::bar4<!> } finally { ::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo4<!> }
|
||||
val inv = try { ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar4<!> } finally { ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo4<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
|
||||
@@ -159,7 +164,7 @@ fun poll45() {
|
||||
}
|
||||
|
||||
fun poll46() {
|
||||
val inv = try { foo7() } finally { ::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> }
|
||||
val inv = try { foo7() } finally { ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> }
|
||||
inv
|
||||
}
|
||||
|
||||
@@ -179,7 +184,7 @@ fun poll52() {
|
||||
}
|
||||
|
||||
fun poll53() {
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::bar4<!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::foo4<!> } finally { ::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo4<!> }
|
||||
val inv = try { ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar4<!> } catch (e: Exception) { ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo4<!> } finally { ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo4<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
|
||||
@@ -194,8 +199,8 @@ fun poll55() {
|
||||
}
|
||||
|
||||
fun poll56() {
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!> } catch (e: Exception) { foo7() } finally { foo7() }
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
val inv = try { ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> } catch (e: Exception) { foo7() } finally { foo7() }
|
||||
inv
|
||||
}
|
||||
|
||||
fun poll6() {
|
||||
@@ -214,7 +219,7 @@ fun poll62() {
|
||||
}
|
||||
|
||||
fun poll63() {
|
||||
val inv = ::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar4<!>
|
||||
val inv = ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar4<!>
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
}
|
||||
|
||||
@@ -229,7 +234,7 @@ fun poll65() {
|
||||
}
|
||||
|
||||
fun poll66() {
|
||||
val inv = ::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!>
|
||||
val inv = ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!>
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
}
|
||||
|
||||
|
||||
-74
@@ -1,74 +0,0 @@
|
||||
// !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
|
||||
import A.Base.Companion.FromABaseCompanion
|
||||
import B.Base.Companion.FromBBaseCompanion
|
||||
import C.Base.Companion.FromCBaseCompanion
|
||||
import D.Base.Companion.FromDBaseCompanion
|
||||
|
||||
// ===== Case 1: LHS is a class
|
||||
//
|
||||
object A {
|
||||
open class Base {
|
||||
companion object {
|
||||
class FromABaseCompanion {
|
||||
fun foo() = 42
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
val a = FromABaseCompanion::foo
|
||||
}
|
||||
}
|
||||
|
||||
// ===== Case 2: LHS is a class with companion object, function comes from class
|
||||
|
||||
object B {
|
||||
open class Base {
|
||||
companion object {
|
||||
class FromBBaseCompanion {
|
||||
fun foo() = 42
|
||||
|
||||
companion object {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
val a = FromBBaseCompanion::foo
|
||||
}
|
||||
}
|
||||
|
||||
// ==== Case 3: LHS is a class with companion object, function comes from companion
|
||||
|
||||
object C {
|
||||
open class Base {
|
||||
companion object {
|
||||
class FromCBaseCompanion {
|
||||
companion object {
|
||||
fun foo() = 42
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
val a = FromCBaseCompanion::foo
|
||||
}
|
||||
}
|
||||
|
||||
// ==== Case 4: LHS is an object
|
||||
|
||||
object D {
|
||||
open class Base {
|
||||
companion object {
|
||||
object FromDBaseCompanion {
|
||||
fun foo() = 42
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
val a = FromDBaseCompanion::foo
|
||||
}
|
||||
}
|
||||
Vendored
+2
-1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
|
||||
import A.Base.Companion.FromABaseCompanion
|
||||
@@ -53,7 +54,7 @@ object C {
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
val a = FromCBaseCompanion::<!UNRESOLVED_REFERENCE!>foo<!>
|
||||
val a = FromCBaseCompanion::foo
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -118,7 +118,7 @@ public object C {
|
||||
|
||||
public final class Derived : C.Base {
|
||||
public constructor Derived()
|
||||
public final val a: [ERROR : Type for FromCBaseCompanion::foo]
|
||||
public final val a: kotlin.reflect.KFunction1<C.Base.Companion.FromCBaseCompanion, kotlin.Int>
|
||||
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
|
||||
|
||||
-69
@@ -1,69 +0,0 @@
|
||||
// !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
|
||||
// ===== Case 1: LHS is a class
|
||||
//
|
||||
object A {
|
||||
open class Base {
|
||||
companion object {
|
||||
class FromBaseCompanion {
|
||||
fun foo() = 42
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
val a = A.Base.Companion.FromBaseCompanion::foo
|
||||
}
|
||||
}
|
||||
|
||||
// ===== Case 2: LHS is a class with companion object, function comes from class
|
||||
|
||||
object B {
|
||||
open class Base {
|
||||
companion object {
|
||||
class FromBaseCompanion {
|
||||
fun foo() = 42
|
||||
|
||||
companion object {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
val a = B.Base.Companion.FromBaseCompanion::foo
|
||||
}
|
||||
}
|
||||
|
||||
// ==== Case 3: LHS is a class with companion object, function comes from companion
|
||||
|
||||
object C {
|
||||
open class Base {
|
||||
companion object {
|
||||
class FromBaseCompanion {
|
||||
companion object {
|
||||
fun foo() = 42
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
val a = C.Base.Companion.FromBaseCompanion::foo
|
||||
}
|
||||
}
|
||||
|
||||
// ==== Case 4: LHS is an object
|
||||
|
||||
object D {
|
||||
open class Base {
|
||||
companion object {
|
||||
object FromBaseCompanion {
|
||||
fun foo() = 42
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
val a = D.Base.Companion.FromBaseCompanion::foo
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
|
||||
// ===== Case 1: LHS is a class
|
||||
@@ -48,7 +49,7 @@ object C {
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
val a = C.Base.Companion.FromBaseCompanion::<!UNRESOLVED_REFERENCE!>foo<!>
|
||||
val a = C.Base.Companion.FromBaseCompanion::foo
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ public object C {
|
||||
|
||||
public final class Derived : C.Base {
|
||||
public constructor Derived()
|
||||
public final val a: [ERROR : Type for C.Base.Companion.FromBaseCompanion::foo]
|
||||
public final val a: kotlin.reflect.KFunction1<C.Base.Companion.FromBaseCompanion, kotlin.Int>
|
||||
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
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ object C {
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
val a = <!DEPRECATED_ACCESS_BY_SHORT_NAME!>FromBaseCompanion<!>::<!UNRESOLVED_REFERENCE!>foo<!>
|
||||
val a = <!DEPRECATED_ACCESS_BY_SHORT_NAME!>FromBaseCompanion<!>::foo
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ public object C {
|
||||
|
||||
public final class Derived : C.Base {
|
||||
public constructor Derived()
|
||||
public final val a: [ERROR : Type for FromBaseCompanion::foo]
|
||||
public final val a: kotlin.reflect.KFunction1<C.Base.Companion.FromBaseCompanion, kotlin.Int>
|
||||
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
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ fun box() {
|
||||
|
||||
println(::<!CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM!>bar<!>.name)
|
||||
println(::<!CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM!>baz<!>.name)
|
||||
println(<!CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM!>A<!>::f.name)
|
||||
println(<!CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM!>A<!>::<!CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM!>f<!>.name)
|
||||
|
||||
B.<!CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM!>Nested<!>()
|
||||
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ fun box() {
|
||||
B.<!CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM!>Nested<!>()
|
||||
|
||||
println(::<!CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM!>bar<!>.name)
|
||||
println(<!CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM!>A<!>::f.name)
|
||||
println(<!CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM!>A<!>::<!CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM!>f<!>.name)
|
||||
|
||||
boo<<!CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM!>B?<!>>(null)
|
||||
<!CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM!>boo<!>(null as B?)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
fun f(x: Any): String {
|
||||
when {
|
||||
x is A<*> -> { // BLOCK
|
||||
return x /*as A<*> */ /*as A<T> */.call(block = local fun <anonymous>(y: Any?): @FlexibleNullability String? {
|
||||
return x /*as A<*> */.call(block = local fun <anonymous>(y: Any?): @FlexibleNullability String? {
|
||||
return "OK"
|
||||
}
|
||||
/*-> @FlexibleNullability I<@FlexibleNullability T?>? */) /*!! String */
|
||||
/*-> @FlexibleNullability I<Nothing>? */) /*!! String */
|
||||
}
|
||||
}
|
||||
return "Fail"
|
||||
|
||||
@@ -10,10 +10,9 @@ FILE fqName:<root> fileName:/genericSamSmartcast.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun f (x: kotlin.Any): kotlin.String declared in <root>'
|
||||
TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String
|
||||
CALL 'public open fun call (block: @[FlexibleNullability] <root>.A.I<@[FlexibleNullability] T of <root>.A?>?): @[FlexibleNullability] kotlin.String? declared in <root>.A' type=@[FlexibleNullability] kotlin.String? origin=null
|
||||
$this: TYPE_OP type=<root>.A<T of <root>.A> origin=IMPLICIT_CAST typeOperand=<root>.A<T of <root>.A>
|
||||
TYPE_OP type=<root>.A<*> origin=IMPLICIT_CAST typeOperand=<root>.A<*>
|
||||
GET_VAR 'x: kotlin.Any declared in <root>.f' type=kotlin.Any origin=null
|
||||
block: TYPE_OP type=@[FlexibleNullability] <root>.A.I<@[FlexibleNullability] T of <root>.A?>? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] <root>.A.I<@[FlexibleNullability] T of <root>.A?>?
|
||||
$this: TYPE_OP type=<root>.A<*> origin=IMPLICIT_CAST typeOperand=<root>.A<*>
|
||||
GET_VAR 'x: kotlin.Any declared in <root>.f' type=kotlin.Any origin=null
|
||||
block: TYPE_OP type=@[FlexibleNullability] <root>.A.I<kotlin.Nothing>? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] <root>.A.I<kotlin.Nothing>?
|
||||
FUN_EXPR type=kotlin.Function1<kotlin.Any?, @[FlexibleNullability] kotlin.String?> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (y:kotlin.Any?) returnType:@[FlexibleNullability] kotlin.String?
|
||||
VALUE_PARAMETER name:y index:0 type:kotlin.Any?
|
||||
|
||||
-1
@@ -8,7 +8,6 @@ class A {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor B(arg: String) defined in A.B
|
||||
Resulting descriptor: constructor B(arg: String) defined in A.B
|
||||
|
||||
Explicit receiver kind = DISPATCH_RECEIVER
|
||||
|
||||
-1
@@ -9,7 +9,6 @@ class A {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor B(x: String) defined in A.B
|
||||
Resulting descriptor: constructor B(x: String) defined in A.B
|
||||
|
||||
Explicit receiver kind = DISPATCH_RECEIVER
|
||||
|
||||
@@ -8,7 +8,6 @@ class A : B, C {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor B(x: Int) defined in B
|
||||
Resulting descriptor: constructor B(x: Int) defined in B
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -8,7 +8,6 @@ class A : B, C {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor B() defined in B
|
||||
Resulting descriptor: constructor B() defined in B
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -8,7 +8,6 @@ class A : B, C {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor B() defined in B
|
||||
Resulting descriptor: constructor B() defined in B
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -10,7 +10,6 @@ class A : B, C {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor B(x: Int) defined in B
|
||||
Resulting descriptor: constructor B(x: Int) defined in B
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
-1
@@ -10,7 +10,6 @@ class A : B, C {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor B() defined in B
|
||||
Resulting descriptor: constructor B() defined in B
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
-1
@@ -11,7 +11,6 @@ class A : B, C {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor B(x: String) defined in B
|
||||
Resulting descriptor: constructor B(x: String) defined in B
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -6,7 +6,6 @@ class A(x: Int) {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A(x: Int) defined in A
|
||||
Resulting descriptor: constructor A(x: Int) defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -7,7 +7,6 @@ class A {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A(x: Int) defined in A
|
||||
Resulting descriptor: constructor A(x: Int) defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -8,7 +8,6 @@ class A(x: Double) {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A(x: String) defined in A
|
||||
Resulting descriptor: constructor A(x: String) defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -10,7 +10,6 @@ class A : B {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor B(vararg x: Int) defined in B
|
||||
Resulting descriptor: constructor B(vararg x: Int) defined in B
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -7,7 +7,6 @@ fun test() {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: fun foo(f: (Int) -> String): Unit defined in root package
|
||||
Resulting descriptor: fun foo(f: (Int) -> String): Unit defined in root package
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -5,7 +5,6 @@ annotation class MyA(val i: Int)
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor MyA(i: Int) defined in MyA
|
||||
Resulting descriptor: constructor MyA(i: Int) defined in MyA
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
-1
@@ -5,7 +5,6 @@ class B: <caret>A() {}
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A() defined in A
|
||||
Resulting descriptor: constructor A() defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -5,7 +5,6 @@ fun foo(array: Array<Int>) {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: operator fun get(index: Int): Int defined in kotlin.Array
|
||||
Resulting descriptor: operator fun get(index: Int): Int defined in kotlin.Array
|
||||
|
||||
Explicit receiver kind = DISPATCH_RECEIVER
|
||||
|
||||
-1
@@ -6,7 +6,6 @@ fun bar(f: Int.()->Unit) {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: operator fun Int.invoke(): Unit defined in kotlin.Function1
|
||||
Resulting descriptor: operator fun Int.invoke(): Unit defined in kotlin.Function1
|
||||
|
||||
Explicit receiver kind = BOTH_RECEIVERS
|
||||
|
||||
@@ -6,7 +6,6 @@ fun bar(f: ()->Unit) {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: operator fun invoke(): Unit defined in kotlin.Function0
|
||||
Resulting descriptor: operator fun invoke(): Unit defined in kotlin.Function0
|
||||
|
||||
Explicit receiver kind = DISPATCH_RECEIVER
|
||||
|
||||
-1
@@ -10,7 +10,6 @@ interface A {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: operator fun Int.invoke(): Unit defined in kotlin.Function1
|
||||
Resulting descriptor: operator fun Int.invoke(): Unit defined in kotlin.Function1
|
||||
|
||||
Explicit receiver kind = BOTH_RECEIVERS
|
||||
|
||||
@@ -9,7 +9,6 @@ fun test(a: A) {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: operator fun invoke(Int): Int defined in kotlin.Function1
|
||||
Resulting descriptor: operator fun invoke(Int): Int defined in kotlin.Function1
|
||||
|
||||
Explicit receiver kind = DISPATCH_RECEIVER
|
||||
|
||||
@@ -6,7 +6,6 @@ fun bar(f: Int.() -> Unit) {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: operator fun Int.invoke(): Unit defined in kotlin.Function1
|
||||
Resulting descriptor: operator fun Int.invoke(): Unit defined in kotlin.Function1
|
||||
|
||||
Explicit receiver kind = BOTH_RECEIVERS
|
||||
|
||||
@@ -8,7 +8,6 @@ fun bar(f: Int.() -> Unit, i: Int) {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: operator fun Int.invoke(): Unit defined in kotlin.Function1
|
||||
Resulting descriptor: operator fun Int.invoke(): Unit defined in kotlin.Function1
|
||||
|
||||
Explicit receiver kind = DISPATCH_RECEIVER
|
||||
|
||||
@@ -9,7 +9,6 @@ fun test() = A<caret>(1)
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: fun invoke(i: Int): Int defined in A.Companion
|
||||
Resulting descriptor: fun invoke(i: Int): Int defined in A.Companion
|
||||
|
||||
Explicit receiver kind = DISPATCH_RECEIVER
|
||||
|
||||
@@ -10,7 +10,6 @@ fun test() = A.ONE<caret>(1)
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: fun invoke(i: Int): Int defined in A
|
||||
Resulting descriptor: fun invoke(i: Int): Int defined in A
|
||||
|
||||
Explicit receiver kind = DISPATCH_RECEIVER
|
||||
|
||||
@@ -7,7 +7,6 @@ fun test() = A<caret>(1)
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: fun invoke(i: Int): Int defined in A
|
||||
Resulting descriptor: fun invoke(i: Int): Int defined in A
|
||||
|
||||
Explicit receiver kind = DISPATCH_RECEIVER
|
||||
|
||||
@@ -13,7 +13,6 @@ val v = <caret>A(1.0)
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A(x: Double) defined in A
|
||||
Resulting descriptor: constructor A(x: Double) defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
-1
@@ -13,7 +13,6 @@ val v = <caret>A("abc")
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A(x: String) defined in A
|
||||
Resulting descriptor: constructor A(x: String) defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
-1
@@ -13,7 +13,6 @@ val v = <caret>A()
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A() defined in A
|
||||
Resulting descriptor: constructor A() defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -6,7 +6,6 @@ val v = <caret>A()
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A() defined in A
|
||||
Resulting descriptor: constructor A() defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -13,7 +13,6 @@ val v = <caret>A("abc")
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A(x: String) defined in A
|
||||
Resulting descriptor: constructor A(x: String) defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -13,7 +13,6 @@ val v = <caret>A(1)
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A(x: Int) defined in A
|
||||
Resulting descriptor: constructor A(x: Int) defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -13,7 +13,6 @@ val v = <caret>A(1, "abc")
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A(x: Int, y: String) defined in A
|
||||
Resulting descriptor: constructor A(x: Int, y: String) defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -13,7 +13,6 @@ val v = <caret>A(1.0)
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A(x: Double, y: String = ...) defined in A
|
||||
Resulting descriptor: constructor A(x: Double, y: String = ...) defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -13,7 +13,6 @@ val v = <caret>A(x=1.0)
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A(x: Double, y: String = ...) defined in A
|
||||
Resulting descriptor: constructor A(x: Double, y: String = ...) defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -10,7 +10,6 @@ val v = <caret>A(1)
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A(x: Int) defined in A
|
||||
Resulting descriptor: constructor A(x: Int) defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
@@ -7,7 +7,6 @@ val y = <caret>A(0, *intArrayOf(1, 2, 3), 4))
|
||||
|
||||
Resolved call:
|
||||
|
||||
Candidate descriptor: constructor A(vararg x: Int) defined in A
|
||||
Resulting descriptor: constructor A(vararg x: Int) defined in A
|
||||
|
||||
Explicit receiver kind = NO_EXPLICIT_RECEIVER
|
||||
|
||||
Reference in New Issue
Block a user