Files
kotlin-fork/compiler/testData/diagnostics/tests/extensions/contextReceivers/parameterizedContextualLambda.kt
T
Anastasia.Shadrina d857142514 KT-51243 Fix parameterized contextual lambda
^KT-51243 Fixed
2022-05-17 15:27:26 +00:00

21 lines
326 B
Kotlin
Vendored

// FIR_IDENTICAL
// SKIP_TXT
// !LANGUAGE: +ContextReceivers
fun <T> test(action: context(T) () -> Unit) {}
fun <T> test2(actionWithArg: context(T) (T) -> Unit) {}
fun main() {
test<String> {
length
}
test<Int> {
toDouble()
}
test2<String> { a ->
length
a.length
}
}