Files
kotlin-fork/compiler/testData/diagnostics/tests/extensions/contextReceivers/overloading.kt
T
2021-12-02 20:24:19 +03:00

17 lines
206 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
context(Int, String)
fun foo(): Int {
return this@Int + 42
}
context(Int)
fun foo(): Int {
return this@Int + 42
}
fun test() {
with(42) {
foo()
}
}