JS/RTTI: support unsafe casts

#KT-2670 fixed
This commit is contained in:
Alexey Tsvetkov
2015-06-11 15:31:54 +03:00
committed by Alexey Andreev
parent 1d2da9729e
commit 3fd387d4a6
17 changed files with 196 additions and 83 deletions
+5
View File
@@ -199,6 +199,7 @@
Kotlin.IllegalStateException = createClassNowWithMessage(Kotlin.RuntimeException);
Kotlin.UnsupportedOperationException = createClassNowWithMessage(Kotlin.RuntimeException);
Kotlin.IndexOutOfBoundsException = createClassNowWithMessage(Kotlin.RuntimeException);
Kotlin.ClassCastException = createClassNowWithMessage(Kotlin.RuntimeException);
Kotlin.IOException = createClassNowWithMessage(Kotlin.Exception);
Kotlin.AssertionError = createClassNowWithMessage(Kotlin.Error);
@@ -206,6 +207,10 @@
throw new Kotlin.NullPointerException(message);
};
Kotlin.throwCCE = function () {
throw new Kotlin.ClassCastException("Illegal cast");
};
function throwAbstractFunctionInvocationError(funName) {
return function () {
var message;