Update nullability assertion tests that use newer Java features
This commit is contained in:
+1
@@ -2,6 +2,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// JVM_TARGET: 1.8
|
||||||
|
|
||||||
// FILE: box.kt
|
// FILE: box.kt
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
Vendored
+1
@@ -3,6 +3,7 @@
|
|||||||
// IGNORE_BACKEND: JVM
|
// IGNORE_BACKEND: JVM
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// JVM_TARGET: 1.8
|
||||||
|
|
||||||
// Note: This fails on JVM (non-IR) with "Fail: should throw on get() in loop header". The not-null assertion is not generated when
|
// Note: This fails on JVM (non-IR) with "Fail: should throw on get() in loop header". The not-null assertion is not generated when
|
||||||
// assigning to the loop variable. The root cause seems to be that the loop variable is a KtParameter and
|
// assigning to the loop variable. The root cause seems to be that the loop variable is a KtParameter and
|
||||||
|
|||||||
+1
@@ -2,6 +2,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// JVM_TARGET: 1.8
|
||||||
|
|
||||||
// FILE: box.kt
|
// FILE: box.kt
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ public class JImpl implements J {
|
|||||||
// Type argument (Int) gets @EnhancedNullability because it is not nullable in overridden Kotlin function.
|
// Type argument (Int) gets @EnhancedNullability because it is not nullable in overridden Kotlin function.
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> listOfNotNull() {
|
public List<Integer> listOfNotNull() {
|
||||||
List<Integer> list = new ArrayList<>();
|
List<Integer> list = new ArrayList<Integer>();
|
||||||
list.add(42);
|
list.add(42);
|
||||||
list.add(-42);
|
list.add(-42);
|
||||||
return list;
|
return list;
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ import java.util.*;
|
|||||||
|
|
||||||
public class J {
|
public class J {
|
||||||
public static List<Integer> listOfMaybeNullable() {
|
public static List<Integer> listOfMaybeNullable() {
|
||||||
List<Integer> list = new ArrayList<>();
|
List<Integer> list = new ArrayList<Integer>();
|
||||||
list.add(42);
|
list.add(42);
|
||||||
list.add(null);
|
list.add(null);
|
||||||
return list;
|
return list;
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ import java.util.*;
|
|||||||
|
|
||||||
public class J {
|
public class J {
|
||||||
public static List<Integer> listOfMaybeNullable() {
|
public static List<Integer> listOfMaybeNullable() {
|
||||||
List<Integer> list = new ArrayList<>();
|
List<Integer> list = new ArrayList<Integer>();
|
||||||
list.add(42);
|
list.add(42);
|
||||||
list.add(-42);
|
list.add(-42);
|
||||||
return list;
|
return list;
|
||||||
|
|||||||
+1
@@ -2,6 +2,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// JVM_TARGET: 1.8
|
||||||
|
|
||||||
// FILE: box.kt
|
// FILE: box.kt
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
Vendored
+1
@@ -3,6 +3,7 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
// IGNORE_BACKEND: JVM
|
// IGNORE_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// JVM_TARGET: 1.8
|
||||||
|
|
||||||
// Note: This fails on JVM (non-IR) with "Fail: should throw on get() in loop header". The not-null assertion is not generated when
|
// Note: This fails on JVM (non-IR) with "Fail: should throw on get() in loop header". The not-null assertion is not generated when
|
||||||
// assigning to the loop variable. The root cause seems to be that the loop variable is a KtParameter and
|
// assigning to the loop variable. The root cause seems to be that the loop variable is a KtParameter and
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// JVM_TARGET: 1.8
|
||||||
|
|
||||||
// FILE: box.kt
|
// FILE: box.kt
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
+1
@@ -3,6 +3,7 @@
|
|||||||
// IGNORE_BACKEND: JVM
|
// IGNORE_BACKEND: JVM
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// JVM_TARGET: 1.8
|
||||||
|
|
||||||
// Note: This fails on JVM (non-IR) with "Fail: should throw on get() in loop header". The not-null assertion is not generated when
|
// Note: This fails on JVM (non-IR) with "Fail: should throw on get() in loop header". The not-null assertion is not generated when
|
||||||
// assigning to the loop variable. The root cause seems to be that the loop variable is a KtParameter and
|
// assigning to the loop variable. The root cause seems to be that the loop variable is a KtParameter and
|
||||||
|
|||||||
+1
@@ -2,6 +2,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// JVM_TARGET: 1.8
|
||||||
|
|
||||||
// FILE: box.kt
|
// FILE: box.kt
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
+1
@@ -3,6 +3,7 @@
|
|||||||
// IGNORE_BACKEND: JVM
|
// IGNORE_BACKEND: JVM
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// JVM_TARGET: 1.8
|
||||||
|
|
||||||
// Note: This fails on JVM (non-IR) with "Fail: should throw on get()". The not-null assertion is not generated when assigning to the
|
// Note: This fails on JVM (non-IR) with "Fail: should throw on get()". The not-null assertion is not generated when assigning to the
|
||||||
// variables in the destructuring declaration. The root cause seems to be that
|
// variables in the destructuring declaration. The root cause seems to be that
|
||||||
|
|||||||
+1
@@ -2,6 +2,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// JVM_TARGET: 1.8
|
||||||
|
|
||||||
// FILE: box.kt
|
// FILE: box.kt
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
compiler/testData/codegen/box/ranges/javaInterop/withIndex/javaCollectionOfMaybeNullableWithIndex.kt
Vendored
+1
-1
@@ -23,7 +23,7 @@ import java.util.*;
|
|||||||
|
|
||||||
public class J {
|
public class J {
|
||||||
public static List<Integer> listOfMaybeNullable() {
|
public static List<Integer> listOfMaybeNullable() {
|
||||||
List<Integer> list = new ArrayList<>();
|
List<Integer> list = new ArrayList<Integer>();
|
||||||
list.add(42);
|
list.add(42);
|
||||||
list.add(null);
|
list.add(null);
|
||||||
return list;
|
return list;
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ import java.util.*;
|
|||||||
|
|
||||||
public class J {
|
public class J {
|
||||||
public static List<Integer> listOfMaybeNullable() {
|
public static List<Integer> listOfMaybeNullable() {
|
||||||
List<Integer> list = new ArrayList<>();
|
List<Integer> list = new ArrayList<Integer>();
|
||||||
list.add(42);
|
list.add(42);
|
||||||
list.add(-42);
|
list.add(-42);
|
||||||
return list;
|
return list;
|
||||||
|
|||||||
Vendored
+1
@@ -2,6 +2,7 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// JVM_TARGET: 1.8
|
||||||
|
|
||||||
// FILE: box.kt
|
// FILE: box.kt
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
compiler/testData/codegen/box/ranges/javaInterop/withIndex/javaIteratorOfNotNullWithIndexFailFast.kt
Vendored
+1
@@ -3,6 +3,7 @@
|
|||||||
// IGNORE_BACKEND: JVM
|
// IGNORE_BACKEND: JVM
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// JVM_TARGET: 1.8
|
||||||
|
|
||||||
// Note: This fails on JVM (non-IR) with "Fail: should throw on get()". The not-null assertion is not generated when assigning to the
|
// Note: This fails on JVM (non-IR) with "Fail: should throw on get()". The not-null assertion is not generated when assigning to the
|
||||||
// variables in the destructuring declaration. The root cause seems to be that
|
// variables in the destructuring declaration. The root cause seems to be that
|
||||||
|
|||||||
Reference in New Issue
Block a user