A quick and dirty fix for

KT-498 Very strange error in the type checker
This commit is contained in:
Andrey Breslav
2011-12-01 14:52:48 +03:00
parent aad2d17cd8
commit 8d439f6058
2 changed files with 10 additions and 1 deletions
@@ -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. ?!!!
}