Assertions on approximation of platform types to non-null types

- for most expressions (ExpressionCodegen.genQualified)
This commit is contained in:
Andrey Breslav
2014-10-05 22:18:15 +04:00
parent 3d5d3e00e3
commit f1c66fa6b0
11 changed files with 193 additions and 24 deletions
@@ -37,6 +37,13 @@ public class Intrinsics {
throw new KotlinNullPointerException();
}
public static void checkExpressionValueIsNotNull(Object value, String message) {
if (value == null) {
IllegalStateException exception = new IllegalStateException(message + " must not be null");
throw sanitizeStackTrace(exception);
}
}
public static void checkReturnedValueIsNotNull(Object value, String className, String methodName) {
if (value == null) {
IllegalStateException exception =