Files
kotlin-fork/compiler/testData/codegen/box/callableReference/bound/boundReferenceToOverloadedFunction.kt
T
Mikhail Zarechenskiy ce690d8a1d Add test for obsolete issue
#KT-36121 Obsolete
2020-01-29 11:43:11 +03:00

26 lines
549 B
Kotlin
Vendored

// !LANGUAGE: +NewInference
// IGNORE_BACKEND_FIR: JVM_IR
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
}