KT-51243 Fix parameterized contextual lambda
^KT-51243 Fixed
This commit is contained in:
committed by
teamcity
parent
efd5beb49b
commit
d857142514
Vendored
+20
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user