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.
This commit is contained in:
Dmitry Petrov
2020-03-05 16:37:51 +03:00
parent 7c7245fbb9
commit 4038c758ca
9 changed files with 332 additions and 2 deletions
@@ -0,0 +1,9 @@
fun foo(x: String = ""): String = x
class C(val x: String = "")
fun use(fn: () -> Any) = fn()
fun testFn() = use(::foo)
fun testCtor() = use(::C)