Files
kotlin-fork/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt.txt
T
Dmitriy Novozhilov b454fcc1e0 [FIR] Save IR dumps to .ir.txt files instead of .txt in tests
This is needed to avoid clashes between different dumps from different
  handlers
2021-10-12 17:26:36 +03:00

51 lines
821 B
Plaintext
Vendored

fun use(f: @ExtensionFunctionType Function2<C, Int, Unit>) {
}
class C {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
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(f = { // BLOCK
local fun extensionVararg(p0: C, p1: Int) {
p0.extensionVararg(i = p1)
}
::extensionVararg
})
}
fun testExtensionDefault() {
use(f = { // BLOCK
local fun extensionDefault(p0: C, p1: Int) {
p0.extensionDefault(i = p1)
}
::extensionDefault
})
}
fun testExtensionBoth() {
use(f = { // BLOCK
local fun extensionBoth(p0: C, p1: Int) {
p0.extensionBoth(i = p1)
}
::extensionBoth
})
}