FIR: support adapted callable reference with vararg
This commit is contained in:
committed by
Mikhail Glukhikh
parent
4332e95b8a
commit
0e54f98b79
Vendored
-2
@@ -1,6 +1,4 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
|
||||
class Outer(val o: String) {
|
||||
inner class Inner1(val i: Int, vararg v: String) {
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun foo(
|
||||
f: (
|
||||
|
||||
Vendored
-1
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun call0(f: (String) -> String, x: String): String = f(x)
|
||||
fun call1(f: (String, String) -> String, x: String, y: String): String = f(x, y)
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
fun sum(vararg args: Int): Int {
|
||||
|
||||
Vendored
-1
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun foo(x: Int, s: Int, vararg y: CharSequence = arrayOf("Aaa")): String =
|
||||
if (y.size == s && y[0].length == x) "OK" else "Fail"
|
||||
|
||||
Reference in New Issue
Block a user