Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/kt32836.kt
T
Mikhail Zarechenskiy d59b910403 Add tests for obsolete issues
#KT-32207 Obsolete
 #KT-32836 Obsolete
 #KT-32949 Obsolete
 #KT-9384 Obsolete
2019-08-15 13:01:39 +03:00

17 lines
438 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
inline fun <reified T> parse(json: String): T? = TODO()
class MyType
fun parseMyData(json: String): MyType =
try {
parse(json) // error with new inf only: Cannot use 'Nothing?' as reified type parameter
?: throw IllegalArgumentException("Can't parse")
} catch (e: Exception) {
throw IllegalArgumentException("Can't parse")
}
fun main() {
parseMyData("")
}