K2: don't accept reflective function kinds as possible lambda type
#KT-56954 Fixed
This commit is contained in:
committed by
Space Team
parent
7a6ff5de34
commit
af78ef77b4
+1
-1
@@ -5,5 +5,5 @@ import kotlin.reflect.KFunction0
|
||||
fun foo(arg: KFunction0<Unit>) {}
|
||||
|
||||
fun main() {
|
||||
foo(fun() {}) // K1: TYPE_MISMATCH, K2: ok in compile-time & CCE at run-time
|
||||
foo(<!ARGUMENT_TYPE_MISMATCH!>fun() {}<!>) // K1: TYPE_MISMATCH, K2: ok in compile-time & CCE at run-time
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user