KT-51951 Add a test
This commit is contained in:
committed by
Space Team
parent
01cabefea7
commit
b31209a38a
@@ -0,0 +1,17 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_STDLIB
|
||||
|
||||
typealias StringProvider = () -> String
|
||||
|
||||
context(StringProvider)
|
||||
fun doSomething() {
|
||||
println(this@StringProvider())
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
with({ "" }) {
|
||||
doSomething()
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user