Files
kotlin-fork/compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt
T
Dmitry Petrov 4038c758ca KT-37131 Record default arguments in argument adaptation
Also, don't adapt argument when expected type is base reflection type
(KCallable<T>, etc), since such types don't contain parameter types.
2020-03-05 19:32:39 +03:00

9 lines
149 B
Kotlin
Vendored

fun foo(x: String = ""): String = x
class C(val x: String = "")
fun use(fn: () -> Any) = fn()
fun testFn() = use(::foo)
fun testCtor() = use(::C)