Prohibit adapted reference resolve against reflective types
There are design questions about reflection for adapted references, so the current proposal is to prohibit reflection on them and support it properly later #KT-40406 Fixed
This commit is contained in:
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: -AdaptedCallableReferenceAgainstReflectiveType
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.KCallable
|
||||
|
||||
fun take(k: KCallable<*>) {}
|
||||
|
||||
fun foo(x: Int = 0) {}
|
||||
|
||||
fun test() {
|
||||
take(::foo)
|
||||
}
|
||||
Reference in New Issue
Block a user