Changed type of exception from CastClassException to TypeCastException

When converting from null to non-nullable type kotlin JVM throws TypeCastException
This commit is contained in:
Igor Chevdar
2017-03-29 19:15:31 +03:00
parent 9d64aa7153
commit 662abba4a7
2 changed files with 7 additions and 3 deletions
@@ -31,6 +31,10 @@ fun ThrowClassCastException(): Nothing {
throw ClassCastException()
}
fun ThrowTypeCastException(): Nothing {
throw TypeCastException()
}
@ExportForCppRuntime
internal fun ThrowArithmeticException() : Nothing {
throw ArithmeticException()