Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/kt498.jet
T
2012-03-12 22:54:24 +04:00

8 lines
305 B
Plaintext

// KT-498 Very strange error in the type checker
class IdUnavailableException() : Exception() {}
fun <T : Any> T.getJavaClass() : Class<T> {
return <!UNCHECKED_CAST!>((this <!CAST_NEVER_SUCCEEDS!>as<!> Object).getClass()) as Class<T><!> // Some error here, because of Exception() used above. ?!!!
}