Use Intrinsics.checkNotNullParameter to throw NPE in parameter null checks

Similarly to previous commits, this method was unused, so we're changing
its semantics in API version >= 1.4.

 #KT-22275 In Progress
This commit is contained in:
Alexander Udalov
2019-08-06 10:56:44 +02:00
parent 480313210a
commit 2baddb029c
23 changed files with 173 additions and 16 deletions
@@ -13,4 +13,5 @@ fun AsNonNullReference.nonNullReferenceExtension(b1: AsNonNullReference) {} // 2
fun asNullablePrimitive(c: AsNonNullPrimitive?) {}
fun asNullableReference(c: AsNonNullReference?) {}
// 8 checkParameterIsNotNull
// 8 checkParameterIsNotNull
// 0 checkNotNullParameter
@@ -5,4 +5,5 @@ inline class AsAny(val a: Any?)
fun asNotNullAny(a: AsAny) {}
fun AsAny.asNotNullAnyExtension(b: AsAny): AsAny = this
// 0 checkParameterIsNotNull
// 0 checkParameterIsNotNull
// 0 checkNotNullParameter