Update testData in bytecodeText (argument nullability assertions)
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
// FILE: JavaClass.java
|
// FILE: JavaClass.java
|
||||||
|
|
||||||
public class JavaClass {
|
public class JavaClass {
|
||||||
|
|||||||
+44
-43
@@ -1,47 +1,5 @@
|
|||||||
// KOTLIN_CONFIGURATION_FLAGS: +JVM.DISABLE_PARAM_ASSERTIONS, +JVM.DISABLE_CALL_ASSERTIONS
|
// KOTLIN_CONFIGURATION_FLAGS: +JVM.DISABLE_PARAM_ASSERTIONS, +JVM.DISABLE_CALL_ASSERTIONS
|
||||||
// FILE: A.java
|
// FILE: noCallAssertions.kt
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
public class A {
|
|
||||||
@NotNull
|
|
||||||
public final String NULL = null;
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
public static final String STATIC_NULL = null;
|
|
||||||
|
|
||||||
public String foo() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String staticFoo() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public A plus(A a) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public A inc() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Object get(Object o) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public A a() { return this; }
|
|
||||||
|
|
||||||
public static class B {
|
|
||||||
public static B b() { return null; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class C {
|
|
||||||
public static C c() { return null; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FILE: AssertionChecker.kt
|
|
||||||
|
|
||||||
class AssertionChecker(val illegalStateExpected: Boolean) {
|
class AssertionChecker(val illegalStateExpected: Boolean) {
|
||||||
operator fun invoke(name: String, f: () -> Any) {
|
operator fun invoke(name: String, f: () -> Any) {
|
||||||
@@ -122,3 +80,46 @@ fun box(): String {
|
|||||||
checkAssertions(false)
|
checkAssertions(false)
|
||||||
return "OK"
|
return "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FILE: A.java
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
public class A {
|
||||||
|
@NotNull
|
||||||
|
public final String NULL = null;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public static final String STATIC_NULL = null;
|
||||||
|
|
||||||
|
public String foo() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String staticFoo() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public A plus(A a) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public A inc() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object get(Object o) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public A a() { return this; }
|
||||||
|
|
||||||
|
public static class B {
|
||||||
|
public static B b() { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class C {
|
||||||
|
public static C c() { return null; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
-1
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
// FILE: RightElvisOperand.java
|
// FILE: RightElvisOperand.java
|
||||||
|
|
||||||
class RightElvisOperand {
|
class RightElvisOperand {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
//WITH_RUNTIME
|
//WITH_RUNTIME
|
||||||
// FILE: JavaClass.java
|
// FILE: JavaClass.java
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
// Missing IMPLICIT_NOTNULL casts
|
|
||||||
import java.util.ArrayList
|
import java.util.ArrayList
|
||||||
|
|
||||||
fun foo(): Any {
|
fun foo(): Any {
|
||||||
|
|||||||
-3
@@ -1,6 +1,3 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
// Missing IMPLICIT_NOTNULL casts
|
|
||||||
|
|
||||||
class A<T> {
|
class A<T> {
|
||||||
fun add(element: T) {}
|
fun add(element: T) {}
|
||||||
}
|
}
|
||||||
|
|||||||
-2
@@ -1,5 +1,3 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
// Missing IMPLICIT_NOTNULL casts
|
|
||||||
// FILE: A.java
|
// FILE: A.java
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
|||||||
+4
@@ -1,4 +1,8 @@
|
|||||||
// FILE: test/CallableDescriptor.java
|
// FILE: test/CallableDescriptor.java
|
||||||
|
|
||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
// ^ TODO decide if we should generate nullability assertions on arguments of 'contains' and other funs with special bridges
|
||||||
|
|
||||||
package test;
|
package test;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|||||||
Reference in New Issue
Block a user