KT-51951 Add a test

This commit is contained in:
Pavel Mikhailovskii
2022-12-08 15:33:28 +01:00
committed by Space Team
parent 01cabefea7
commit b31209a38a
3 changed files with 29 additions and 0 deletions
@@ -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"
}