KT-51863 Account for context receivers in calls with changed parameter order
This commit is contained in:
committed by
Space Team
parent
e9984ce38d
commit
25ad7fe31c
@@ -0,0 +1,20 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_STDLIB
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
context(String, List<String>)
|
||||
fun test(x: Any, y: Int = 0): List<Any> = listOf(this@String, this@List, x, y)
|
||||
|
||||
fun box(): String {
|
||||
with("context1") {
|
||||
with(listOf("context2")) {
|
||||
assertEquals(
|
||||
listOf("context1", listOf("context2"), listOf(1), 1),
|
||||
test(y = 1, x = listOf(1))
|
||||
)
|
||||
}
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user