A quick and dirty fix for
KT-498 Very strange error in the type checker
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// KT-498 Very strange error in the type checker
|
||||
// +JDK
|
||||
|
||||
class IdUnavailableException() : Exception() {}
|
||||
|
||||
fun <T : Any> T.getJavaClass() : Class<T> {
|
||||
return ((this <!CAST_NEVER_SUCCEEDS!>as<!> Object).getClass()) as Class<T> // Some error here, because of Exception() used above. ?!!!
|
||||
}
|
||||
Reference in New Issue
Block a user