Files
kotlin-fork/compiler/testData/codegen/box/callableReference/bound/boundReferenceToOverloadedFunction.kt
T
Alexander Udalov 1071919706 Remove backend tests on old inference
Also remove any mentions of NewInference, and rename some tests.
2021-11-09 20:07:33 +01:00

24 lines
491 B
Kotlin
Vendored

interface JsonParser
interface JsonCodingParser : JsonParser
var result = "fail"
fun JsonCodingParser.parseValue(source: String): Any = source
fun JsonParser.parseValue(source: String): Any = TODO()
fun testDecoding(decode: (String) -> Any) {
result = decode("OK") as String
}
class Test {
fun fooTest() {
val foo: JsonCodingParser = object : JsonCodingParser {}
testDecoding(foo::parseValue)
}
}
fun box(): String {
Test().fooTest()
return result
}