Add test for obsolete issue

#KT-36121 Obsolete
This commit is contained in:
Mikhail Zarechenskiy
2020-01-28 10:48:47 +03:00
parent e725f255f1
commit ce690d8a1d
7 changed files with 56 additions and 0 deletions
@@ -0,0 +1,26 @@
// !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
}