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,3 +13,4 @@ fun bar(a: ArrayList<String>) {
// 1 checkExpressionValueIsNotNull
// 0 checkNotNullExpressionValue
// 1 checkParameterIsNotNull
// 0 checkNotNullParameter
@@ -1,3 +1,4 @@
fun <T : Any> foo(t: T) = t
// 1 checkParameterIsNotNull
// 0 checkNotNullParameter
@@ -0,0 +1,6 @@
// !API_VERSION: LATEST
fun <T : Any> foo(t: T) = t
// 0 checkParameterIsNotNull
// 1 checkNotNullParameter
@@ -37,3 +37,4 @@ internal fun bar(a: A<String, Int>, b: B<String>, c: C) {
// 3 checkExpressionValueIsNotNull
// 0 checkNotNullExpressionValue
// 3 checkParameterIsNotNull
// 0 checkNotNullParameter