Introduce AdaptedFunctionReference runtime class

It's used as a superclass for anonymous classes for adapted function
references. Its main feature is that it _doesn't_ inherit from KFunction
(as opposed to FunctionReference), as per the decision to postpone
reflection support for adapted function references in KT-36024.

 #KT-36024 Fixed
This commit is contained in:
Alexander Udalov
2020-04-03 21:14:00 +02:00
parent d1c5a42124
commit 0681231e99
14 changed files with 178 additions and 85 deletions
@@ -1,4 +1,4 @@
// IGNORE_BACKEND: JVM_IR, JS, JS_IR, NATIVE
// IGNORE_BACKEND: JS, JS_IR, NATIVE
// FILE: test.kt
fun checkEqual(x: Any, y: Any) {
@@ -1,4 +1,4 @@
// IGNORE_BACKEND: JVM_IR, JS, JS_IR, NATIVE
// IGNORE_BACKEND: JS, JS_IR, NATIVE
// IGNORE_BACKEND_FIR: JVM_IR
// FILE: test.kt
@@ -1,4 +1,4 @@
// IGNORE_BACKEND: JVM_IR, JS, JS_IR, NATIVE
// IGNORE_BACKEND: JS, JS_IR, NATIVE
// IGNORE_BACKEND_FIR: JVM_IR
// FILE: test.kt
@@ -1,4 +1,4 @@
// IGNORE_BACKEND: JVM_IR, JS, JS_IR, NATIVE
// IGNORE_BACKEND: JS, JS_IR, NATIVE
// IGNORE_BACKEND_FIR: JVM_IR
// FILE: test.kt
@@ -1,4 +1,4 @@
// IGNORE_BACKEND: JVM_IR, JS, JS_IR, NATIVE
// IGNORE_BACKEND: JS, JS_IR, NATIVE
// IGNORE_BACKEND_FIR: JVM_IR
// FILE: test.kt
@@ -1,4 +1,4 @@
// IGNORE_BACKEND: JVM_IR, JS, JS_IR, NATIVE
// IGNORE_BACKEND: JS, JS_IR, NATIVE
// IGNORE_BACKEND_FIR: JVM_IR
// FILE: test.kt
@@ -30,9 +30,8 @@ fun box(): String {
checkAny("::CWithDefaults", ::CWithDefaults)
checkAny("::CWithVarargs", ::CWithVarargs)
// TODO KT-37604
// checkUnit("::CWithDefaults", ::CWithDefaults)
// checkUnit("::CWithVarargs", ::CWithVarargs)
checkUnit("::CWithDefaults", ::CWithDefaults)
checkUnit("::CWithVarargs", ::CWithVarargs)
return "OK"
}
}
@@ -1,6 +1,4 @@
// TARGET_BACKEND: JVM
// Temporarily ignored for JVM until KT-36024 is fixed.
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_REFLECT