KT-51243 Fix parameterized contextual lambda

^KT-51243 Fixed
This commit is contained in:
Anastasia.Shadrina
2022-03-15 15:15:51 +07:00
committed by teamcity
parent efd5beb49b
commit d857142514
10 changed files with 102 additions and 10 deletions
@@ -0,0 +1,20 @@
// 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
}
}