Handle unbound extension receiver in callable reference adaptation
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
|
||||
fun use(f: C.(Int) -> Unit) {}
|
||||
|
||||
class C
|
||||
|
||||
fun C.extensionVararg(i: Int, vararg s: String) {}
|
||||
|
||||
fun C.extensionDefault(i: Int, s: String = "") {}
|
||||
|
||||
fun C.extensionBoth(i: Int, s: String = "", vararg t: String) {}
|
||||
|
||||
fun testExtensionVararg() {
|
||||
use(C::extensionVararg)
|
||||
}
|
||||
|
||||
fun testExtensionDefault() {
|
||||
use(C::extensionDefault)
|
||||
}
|
||||
|
||||
fun testExtensionBoth() {
|
||||
use(C::extensionBoth)
|
||||
}
|
||||
Reference in New Issue
Block a user