Fix codegen of as-casts for nullable generics

This commit is contained in:
Alexander Udalov
2013-02-06 17:02:54 +04:00
parent 70f67c7993
commit 75f09b7527
3 changed files with 29 additions and 13 deletions
@@ -0,0 +1,13 @@
fun castToString<T>(t: T) {
t as String
}
fun box(): String {
try {
castToString<Any?>(null)
} catch (e: Exception) {
return "OK"
}
return "Fail"
}