[IR] Supported inlining of adapted references + tests
This commit is contained in:
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
inline fun foo(vararg l: Long, s: String = "OK"): String =
|
||||
if (l.size == 0) s else "Fail"
|
||||
|
||||
inline fun bar(f: () -> String): String = f()
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
fun box(): String = bar(::foo)
|
||||
Reference in New Issue
Block a user