Add box and PSI2IR tests for special cases listed in KT-35849
This commit is contained in:
Generated
+63
@@ -15979,6 +15979,69 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class NullCheckOnLambdaReturnValue extends AbstractFirBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNullCheckOnLambdaReturnValue() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsT.kt")
|
||||
public void testNnStringVsT() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsT.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTAny.kt")
|
||||
public void testNnStringVsTAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTConstrained.kt")
|
||||
public void testNnStringVsTConstrained() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTConstrained.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTXArray.kt")
|
||||
public void testNnStringVsTXArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTXArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTXString.kt")
|
||||
public void testNnStringVsTXString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTXString.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsT.kt")
|
||||
public void testStringVsT() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsT.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTAny.kt")
|
||||
public void testStringVsTAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTConstrained.kt")
|
||||
public void testStringVsTConstrained() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTConstrained.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTXArray.kt")
|
||||
public void testStringVsTXArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTXArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTXString.kt")
|
||||
public void testStringVsTXString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTXString.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/objectMethods")
|
||||
|
||||
+63
@@ -2161,6 +2161,69 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
||||
public void testPlatformTypeReceiver() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class NullCheckOnLambdaResult extends AbstractFir2IrTextTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.ANY, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNullCheckOnLambdaResult() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsT.kt")
|
||||
public void testNnStringVsT() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsT.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTAny.kt")
|
||||
public void testNnStringVsTAny() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTConstrained.kt")
|
||||
public void testNnStringVsTConstrained() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTXArray.kt")
|
||||
public void testNnStringVsTXArray() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTXString.kt")
|
||||
public void testNnStringVsTXString() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXString.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsT.kt")
|
||||
public void testStringVsT() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTAny.kt")
|
||||
public void testStringVsTAny() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTConstrained.kt")
|
||||
public void testStringVsTConstrained() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTXArray.kt")
|
||||
public void testStringVsTXArray() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTXString.kt")
|
||||
public void testStringVsTXString() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: nnStringVsT.kt
|
||||
fun <T> useT(fn: () -> T) = fn()
|
||||
|
||||
fun checkNull(x: Any?) {
|
||||
if (x != null) throw AssertionError("null expected")
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
checkNull(useT { J.notNullString() })
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: nnStringVsTAny.kt
|
||||
fun <T : Any> useTAny(fn: () -> T) = fn()
|
||||
|
||||
fun checkNull(x: Any?) {
|
||||
if (x != null) throw AssertionError("null expected")
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
checkNull(useTAny { J.notNullString() })
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// FILE: nnStringVsTConstrained.kt
|
||||
fun <T> useTConstrained(xs: Array<T>, fn: () -> T) = fn()
|
||||
|
||||
fun box(): String {
|
||||
val xs = Array(1) { "" }
|
||||
try {
|
||||
useTConstrained(xs) { J.notNullString() }
|
||||
} catch (e: NullPointerException) {
|
||||
return "OK"
|
||||
}
|
||||
throw AssertionError("NullPointerException expected")
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// FILE: nnStringVsTXArray.kt
|
||||
fun <T> useTX(x: T, fn: () -> T) = fn()
|
||||
|
||||
fun box(): String {
|
||||
val xs = Array(1) { "" }
|
||||
try {
|
||||
useTX(xs) { J.notNullString() }
|
||||
} catch (e: NullPointerException) {
|
||||
return "OK"
|
||||
}
|
||||
throw AssertionError("NullPointerException expected")
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// FILE: nnStringVsTXString.kt
|
||||
fun <T> useTX(x: T, fn: () -> T) = fn()
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
useTX("") { J.notNullString() }
|
||||
} catch (e: NullPointerException) {
|
||||
return "OK"
|
||||
}
|
||||
throw AssertionError("NullPointerException expected")
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: stringVsT.kt
|
||||
fun <T> useT(fn: () -> T) = fn()
|
||||
|
||||
fun checkNull(x: Any?) {
|
||||
if (x != null) throw AssertionError("null expected")
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
checkNull(useT { J.string() })
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: stringVsTAny.kt
|
||||
fun <T : Any> useTAny(fn: () -> T) = fn()
|
||||
|
||||
fun checkNull(x: Any?) {
|
||||
if (x != null) throw AssertionError("null expected")
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
checkNull(useTAny { J.string() })
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// FILE: stringVsTConstrained.kt
|
||||
fun <T> useTConstrained(xs: Array<T>, fn: () -> T) = fn()
|
||||
|
||||
fun box(): String {
|
||||
val xs = Array(1) { "" }
|
||||
try {
|
||||
useTConstrained(xs) { J.string() }
|
||||
} catch (e: NullPointerException) {
|
||||
return "OK"
|
||||
}
|
||||
throw AssertionError("NullPointerException expected")
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: stringVsTXArray.kt
|
||||
fun <T> useTX(x: T, fn: () -> T) = fn()
|
||||
|
||||
fun checkNull(x: Any?) {
|
||||
if (x != null) throw AssertionError("null expected")
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val xs = Array(1) { "" }
|
||||
checkNull(useTX(xs) { J.string() })
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: stringVsTXString.kt
|
||||
fun <T> useTX(x: T, fn: () -> T) = fn()
|
||||
|
||||
fun checkNull(x: Any?) {
|
||||
if (x != null) throw AssertionError("null expected")
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
checkNull(useTX("") { J.string() })
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
FILE fqName:<root> fileName:/javaWildcardType.kt
|
||||
CLASS INTERFACE name:K modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.K
|
||||
FUN name:kf1 visibility:public modality:ABSTRACT <> ($this:<root>.K) returnType:kotlin.collections.Collection<out kotlin.CharSequence>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.K
|
||||
FUN name:kf2 visibility:public modality:ABSTRACT <> ($this:<root>.K) returnType:kotlin.collections.Collection<kotlin.CharSequence>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.K
|
||||
FUN name:kg1 visibility:public modality:ABSTRACT <> ($this:<root>.K, c:kotlin.collections.Collection<out kotlin.CharSequence>) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.K
|
||||
VALUE_PARAMETER name:c index:0 type:kotlin.collections.Collection<out kotlin.CharSequence>
|
||||
FUN name:kg2 visibility:public modality:ABSTRACT <> ($this:<root>.K, c:kotlin.collections.Collection<kotlin.CharSequence>) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.K
|
||||
VALUE_PARAMETER name:c index:0 type:kotlin.collections.Collection<kotlin.CharSequence>
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.J; <root>.K]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
|
||||
CONSTRUCTOR visibility:public <> (j:<root>.J, k:<root>.K) returnType:<root>.C [primary]
|
||||
VALUE_PARAMETER name:j index:0 type:<root>.J
|
||||
VALUE_PARAMETER name:k index:1 type:<root>.K
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.J; <root>.K]'
|
||||
SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.J visibility:local [final]' type=kotlin.Unit origin=EQ
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C' type=<root>.C origin=null
|
||||
value: GET_VAR 'j: <root>.J declared in <root>.C.<init>' type=<root>.J origin=null
|
||||
SET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:<root>.K visibility:local [final]' type=kotlin.Unit origin=EQ
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C' type=<root>.C origin=null
|
||||
value: GET_VAR 'k: <root>.K declared in <root>.C.<init>' type=<root>.K origin=null
|
||||
FUN DELEGATED_MEMBER name:jf1 visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.collections.Collection<out kotlin.CharSequence?>?
|
||||
overridden:
|
||||
public abstract fun jf1 (): kotlin.collections.Collection<out kotlin.CharSequence?>? declared in <root>.J
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.C
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun jf1 (): kotlin.collections.Collection<out kotlin.CharSequence?>? declared in <root>.C'
|
||||
CALL 'public abstract fun jf1 (): kotlin.collections.Collection<out kotlin.CharSequence?>? declared in <root>.J' type=kotlin.collections.Collection<out kotlin.CharSequence?>? origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.J visibility:local [final]' type=<root>.J origin=null
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.jf1' type=<root>.C origin=null
|
||||
FUN DELEGATED_MEMBER name:jf2 visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.collections.Collection<kotlin.CharSequence?>?
|
||||
overridden:
|
||||
public abstract fun jf2 (): kotlin.collections.Collection<kotlin.CharSequence?>? declared in <root>.J
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.C
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun jf2 (): kotlin.collections.Collection<kotlin.CharSequence?>? declared in <root>.C'
|
||||
CALL 'public abstract fun jf2 (): kotlin.collections.Collection<kotlin.CharSequence?>? declared in <root>.J' type=kotlin.collections.Collection<kotlin.CharSequence?>? origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.J visibility:local [final]' type=<root>.J origin=null
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.jf2' type=<root>.C origin=null
|
||||
FUN DELEGATED_MEMBER name:jg1 visibility:public modality:OPEN <> ($this:<root>.C, c:kotlin.collections.Collection<out kotlin.CharSequence?>?) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun jg1 (c: kotlin.collections.Collection<out kotlin.CharSequence?>?): kotlin.Unit declared in <root>.J
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.C
|
||||
VALUE_PARAMETER name:c index:0 type:kotlin.collections.Collection<out kotlin.CharSequence?>?
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun jg1 (c: kotlin.collections.Collection<out kotlin.CharSequence?>?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.J visibility:local [final]' type=<root>.J origin=null
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.jg1' type=<root>.C origin=null
|
||||
c: GET_VAR 'c: kotlin.collections.Collection<out kotlin.CharSequence?>? declared in <root>.C.jg1' type=kotlin.collections.Collection<out kotlin.CharSequence?>? origin=null
|
||||
FUN DELEGATED_MEMBER name:jg2 visibility:public modality:OPEN <> ($this:<root>.C, c:kotlin.collections.Collection<kotlin.CharSequence?>?) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun jg2 (c: kotlin.collections.Collection<kotlin.CharSequence?>?): kotlin.Unit declared in <root>.J
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.C
|
||||
VALUE_PARAMETER name:c index:0 type:kotlin.collections.Collection<kotlin.CharSequence?>?
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun jg2 (c: kotlin.collections.Collection<kotlin.CharSequence?>?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.J visibility:local [final]' type=<root>.J origin=null
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.jg2' type=<root>.C origin=null
|
||||
c: GET_VAR 'c: kotlin.collections.Collection<kotlin.CharSequence?>? declared in <root>.C.jg2' type=kotlin.collections.Collection<kotlin.CharSequence?>? origin=null
|
||||
FUN DELEGATED_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.C, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.C
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.C'
|
||||
CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.J visibility:local [final]' type=<root>.J origin=null
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
|
||||
other: GET_VAR 'other: kotlin.Any? declared in <root>.C.equals' type=kotlin.Any? origin=null
|
||||
FUN DELEGATED_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.Int
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.C
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.C'
|
||||
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.J visibility:local [final]' type=<root>.J origin=null
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.hashCode' type=<root>.C origin=null
|
||||
FUN DELEGATED_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.C
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.C'
|
||||
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:<root>.J visibility:local [final]' type=<root>.J origin=null
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.toString' type=<root>.C origin=null
|
||||
FIELD DELEGATE name:<$$delegate_0> type:<root>.J visibility:local [final]
|
||||
FUN DELEGATED_MEMBER name:kf1 visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.collections.Collection<out kotlin.CharSequence>
|
||||
overridden:
|
||||
public abstract fun kf1 (): kotlin.collections.Collection<out kotlin.CharSequence> declared in <root>.K
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.C
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun kf1 (): kotlin.collections.Collection<out kotlin.CharSequence> declared in <root>.C'
|
||||
CALL 'public abstract fun kf1 (): kotlin.collections.Collection<out kotlin.CharSequence> declared in <root>.K' type=kotlin.collections.Collection<out kotlin.CharSequence> origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:<root>.K visibility:local [final]' type=<root>.K origin=null
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.kf1' type=<root>.C origin=null
|
||||
FUN DELEGATED_MEMBER name:kf2 visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.collections.Collection<kotlin.CharSequence>
|
||||
overridden:
|
||||
public abstract fun kf2 (): kotlin.collections.Collection<kotlin.CharSequence> declared in <root>.K
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.C
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun kf2 (): kotlin.collections.Collection<kotlin.CharSequence> declared in <root>.C'
|
||||
CALL 'public abstract fun kf2 (): kotlin.collections.Collection<kotlin.CharSequence> declared in <root>.K' type=kotlin.collections.Collection<kotlin.CharSequence> origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:<root>.K visibility:local [final]' type=<root>.K origin=null
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.kf2' type=<root>.C origin=null
|
||||
FUN DELEGATED_MEMBER name:kg1 visibility:public modality:OPEN <> ($this:<root>.C, c:kotlin.collections.Collection<out kotlin.CharSequence>) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun kg1 (c: kotlin.collections.Collection<out kotlin.CharSequence>): kotlin.Unit declared in <root>.K
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.C
|
||||
VALUE_PARAMETER name:c index:0 type:kotlin.collections.Collection<out kotlin.CharSequence>
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun kg1 (c: kotlin.collections.Collection<out kotlin.CharSequence>): kotlin.Unit declared in <root>.K' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:<root>.K visibility:local [final]' type=<root>.K origin=null
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.kg1' type=<root>.C origin=null
|
||||
c: GET_VAR 'c: kotlin.collections.Collection<out kotlin.CharSequence> declared in <root>.C.kg1' type=kotlin.collections.Collection<out kotlin.CharSequence> origin=null
|
||||
FUN DELEGATED_MEMBER name:kg2 visibility:public modality:OPEN <> ($this:<root>.C, c:kotlin.collections.Collection<kotlin.CharSequence>) returnType:kotlin.Unit
|
||||
overridden:
|
||||
public abstract fun kg2 (c: kotlin.collections.Collection<kotlin.CharSequence>): kotlin.Unit declared in <root>.K
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.C
|
||||
VALUE_PARAMETER name:c index:0 type:kotlin.collections.Collection<kotlin.CharSequence>
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun kg2 (c: kotlin.collections.Collection<kotlin.CharSequence>): kotlin.Unit declared in <root>.K' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:<root>.K visibility:local [final]' type=<root>.K origin=null
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.kg2' type=<root>.C origin=null
|
||||
c: GET_VAR 'c: kotlin.collections.Collection<kotlin.CharSequence> declared in <root>.C.kg2' type=kotlin.collections.Collection<kotlin.CharSequence> origin=null
|
||||
FIELD DELEGATE name:<$$delegate_1> type:<root>.K visibility:local [final]
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
FILE fqName:<root> fileName:/nnStringVsT.kt
|
||||
FUN name:useT visibility:public modality:FINAL <T> (fn:kotlin.Function0<T of <root>.useT>) returnType:T of <root>.useT
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function0<T of <root>.useT>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useT <T> (fn: kotlin.Function0<T of <root>.useT>): T of <root>.useT declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useT origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useT> declared in <root>.useT' type=kotlin.Function0<T of <root>.useT> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testNoNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useT <T> (fn: kotlin.Function0<T of <root>.useT>): T of <root>.useT declared in <root>' type=kotlin.String origin=null
|
||||
<T>: kotlin.String
|
||||
fn: FUN_EXPR type=kotlin.Function0<kotlin.String> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.testNoNullCheck'
|
||||
CALL 'public open fun notNullString (): kotlin.String declared in <root>.J' type=kotlin.String origin=null
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: nnStringVsT.kt
|
||||
fun <T> useT(fn: () -> T) = fn()
|
||||
|
||||
fun testNoNullCheck() {
|
||||
useT { J.notNullString() }
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
FILE fqName:<root> fileName:/nnStringVsT.kt
|
||||
FUN name:useT visibility:public modality:FINAL <T> (fn:kotlin.Function0<T of <root>.useT>) returnType:T of <root>.useT
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function0<T of <root>.useT>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useT <T> (fn: kotlin.Function0<T of <root>.useT>): T of <root>.useT declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useT origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useT> declared in <root>.useT' type=kotlin.Function0<T of <root>.useT> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testNoNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useT <T> (fn: kotlin.Function0<T of <root>.useT>): T of <root>.useT declared in <root>' type=@[EnhancedNullability] kotlin.String origin=null
|
||||
<T>: @[EnhancedNullability] kotlin.String
|
||||
fn: FUN_EXPR type=kotlin.Function0<@[EnhancedNullability] kotlin.String> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:@[EnhancedNullability] kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): @[EnhancedNullability] kotlin.String declared in <root>.testNoNullCheck'
|
||||
CALL 'public open fun notNullString (): @[EnhancedNullability] kotlin.String declared in <root>.J' type=@[EnhancedNullability] kotlin.String origin=null
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
FILE fqName:<root> fileName:/nnStringVsTAny.kt
|
||||
FUN name:useTAny visibility:public modality:FINAL <T> (fn:kotlin.Function0<T of <root>.useTAny>) returnType:T of <root>.useTAny
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any]
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function0<T of <root>.useTAny>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTAny <T> (fn: kotlin.Function0<T of <root>.useTAny>): T of <root>.useTAny declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTAny origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTAny> declared in <root>.useTAny' type=kotlin.Function0<T of <root>.useTAny> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testNoNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTAny <T> (fn: kotlin.Function0<T of <root>.useTAny>): T of <root>.useTAny declared in <root>' type=kotlin.String origin=null
|
||||
<T>: kotlin.String
|
||||
fn: FUN_EXPR type=kotlin.Function0<kotlin.String> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.testNoNullCheck'
|
||||
CALL 'public open fun notNullString (): kotlin.String declared in <root>.J' type=kotlin.String origin=null
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: nnStringVsTAny.kt
|
||||
fun <T : Any> useTAny(fn: () -> T) = fn()
|
||||
|
||||
fun testNoNullCheck() {
|
||||
useTAny { J.notNullString() }
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
FILE fqName:<root> fileName:/nnStringVsTAny.kt
|
||||
FUN name:useTAny visibility:public modality:FINAL <T> (fn:kotlin.Function0<T of <root>.useTAny>) returnType:T of <root>.useTAny
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any]
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function0<T of <root>.useTAny>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTAny <T> (fn: kotlin.Function0<T of <root>.useTAny>): T of <root>.useTAny declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTAny origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTAny> declared in <root>.useTAny' type=kotlin.Function0<T of <root>.useTAny> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testNoNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTAny <T> (fn: kotlin.Function0<T of <root>.useTAny>): T of <root>.useTAny declared in <root>' type=@[EnhancedNullability] kotlin.String origin=null
|
||||
<T>: @[EnhancedNullability] kotlin.String
|
||||
fn: FUN_EXPR type=kotlin.Function0<@[EnhancedNullability] kotlin.String> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:@[EnhancedNullability] kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): @[EnhancedNullability] kotlin.String declared in <root>.testNoNullCheck'
|
||||
CALL 'public open fun notNullString (): @[EnhancedNullability] kotlin.String declared in <root>.J' type=@[EnhancedNullability] kotlin.String origin=null
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
FILE fqName:<root> fileName:/nnStringVsTConstrained.kt
|
||||
FUN name:useTConstrained visibility:public modality:FINAL <T> (xs:kotlin.Array<T of <root>.useTConstrained>, fn:kotlin.Function0<T of <root>.useTConstrained>) returnType:T of <root>.useTConstrained
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<T of <root>.useTConstrained>
|
||||
VALUE_PARAMETER name:fn index:1 type:kotlin.Function0<T of <root>.useTConstrained>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTConstrained <T> (xs: kotlin.Array<T of <root>.useTConstrained>, fn: kotlin.Function0<T of <root>.useTConstrained>): T of <root>.useTConstrained declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTConstrained origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTConstrained> declared in <root>.useTConstrained' type=kotlin.Function0<T of <root>.useTConstrained> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testWithNullCheck visibility:public modality:FINAL <> (xs:kotlin.Array<kotlin.String>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<kotlin.String>
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTConstrained <T> (xs: kotlin.Array<T of <root>.useTConstrained>, fn: kotlin.Function0<T of <root>.useTConstrained>): T of <root>.useTConstrained declared in <root>' type=kotlin.String origin=null
|
||||
<T>: kotlin.String
|
||||
xs: GET_VAR 'xs: kotlin.Array<kotlin.String> declared in <root>.testWithNullCheck' type=kotlin.Array<kotlin.String> origin=null
|
||||
fn: FUN_EXPR type=kotlin.Function0<kotlin.String> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.testWithNullCheck'
|
||||
CALL 'public open fun notNullString (): kotlin.String declared in <root>.J' type=kotlin.String origin=null
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: nnStringVsTConstrained.kt
|
||||
fun <T> useTConstrained(xs: Array<T>, fn: () -> T) = fn()
|
||||
|
||||
fun testWithNullCheck(xs: Array<String>) {
|
||||
useTConstrained(xs) { J.notNullString() }
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
FILE fqName:<root> fileName:/nnStringVsTConstrained.kt
|
||||
FUN name:useTConstrained visibility:public modality:FINAL <T> (xs:kotlin.Array<T of <root>.useTConstrained>, fn:kotlin.Function0<T of <root>.useTConstrained>) returnType:T of <root>.useTConstrained
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<T of <root>.useTConstrained>
|
||||
VALUE_PARAMETER name:fn index:1 type:kotlin.Function0<T of <root>.useTConstrained>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTConstrained <T> (xs: kotlin.Array<T of <root>.useTConstrained>, fn: kotlin.Function0<T of <root>.useTConstrained>): T of <root>.useTConstrained declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTConstrained origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTConstrained> declared in <root>.useTConstrained' type=kotlin.Function0<T of <root>.useTConstrained> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testWithNullCheck visibility:public modality:FINAL <> (xs:kotlin.Array<kotlin.String>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<kotlin.String>
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTConstrained <T> (xs: kotlin.Array<T of <root>.useTConstrained>, fn: kotlin.Function0<T of <root>.useTConstrained>): T of <root>.useTConstrained declared in <root>' type=kotlin.String origin=null
|
||||
<T>: kotlin.String
|
||||
xs: GET_VAR 'xs: kotlin.Array<kotlin.String> declared in <root>.testWithNullCheck' type=kotlin.Array<kotlin.String> origin=null
|
||||
fn: FUN_EXPR type=kotlin.Function0<kotlin.String> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.testWithNullCheck'
|
||||
CALL 'public open fun notNullString (): @[EnhancedNullability] kotlin.String declared in <root>.J' type=@[EnhancedNullability] kotlin.String origin=null
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
FILE fqName:<root> fileName:/nnStringVsTXArray.kt
|
||||
FUN name:useTX visibility:public modality:FINAL <T> (x:T of <root>.useTX, fn:kotlin.Function0<T of <root>.useTX>) returnType:T of <root>.useTX
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.useTX
|
||||
VALUE_PARAMETER name:fn index:1 type:kotlin.Function0<T of <root>.useTX>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTX origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTX> declared in <root>.useTX' type=kotlin.Function0<T of <root>.useTX> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testWithNullCheck visibility:public modality:FINAL <> (xs:kotlin.Array<kotlin.String>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<kotlin.String>
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>' type=java.io.Serializable origin=null
|
||||
<T>: java.io.Serializable
|
||||
x: GET_VAR 'xs: kotlin.Array<kotlin.String> declared in <root>.testWithNullCheck' type=kotlin.Array<kotlin.String> origin=null
|
||||
fn: FUN_EXPR type=kotlin.Function0<java.io.Serializable> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:java.io.Serializable
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): java.io.Serializable declared in <root>.testWithNullCheck'
|
||||
CALL 'public open fun notNullString (): kotlin.String declared in <root>.J' type=kotlin.String origin=null
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: nnStringVsTXArray.kt
|
||||
fun <T> useTX(x: T, fn: () -> T) = fn()
|
||||
|
||||
fun testWithNullCheck(xs: Array<String>) {
|
||||
useTX(xs) { J.notNullString() }
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
FILE fqName:<root> fileName:/nnStringVsTXArray.kt
|
||||
FUN name:useTX visibility:public modality:FINAL <T> (x:T of <root>.useTX, fn:kotlin.Function0<T of <root>.useTX>) returnType:T of <root>.useTX
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.useTX
|
||||
VALUE_PARAMETER name:fn index:1 type:kotlin.Function0<T of <root>.useTX>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTX origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTX> declared in <root>.useTX' type=kotlin.Function0<T of <root>.useTX> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testWithNullCheck visibility:public modality:FINAL <> (xs:kotlin.Array<kotlin.String>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<kotlin.String>
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>' type=java.io.Serializable origin=null
|
||||
<T>: java.io.Serializable
|
||||
x: GET_VAR 'xs: kotlin.Array<kotlin.String> declared in <root>.testWithNullCheck' type=kotlin.Array<kotlin.String> origin=null
|
||||
fn: FUN_EXPR type=kotlin.Function0<java.io.Serializable> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:java.io.Serializable
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): java.io.Serializable declared in <root>.testWithNullCheck'
|
||||
CALL 'public open fun notNullString (): @[EnhancedNullability] kotlin.String declared in <root>.J' type=@[EnhancedNullability] kotlin.String origin=null
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
FILE fqName:<root> fileName:/nnStringVsTXString.kt
|
||||
FUN name:useTX visibility:public modality:FINAL <T> (x:T of <root>.useTX, fn:kotlin.Function0<T of <root>.useTX>) returnType:T of <root>.useTX
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.useTX
|
||||
VALUE_PARAMETER name:fn index:1 type:kotlin.Function0<T of <root>.useTX>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTX origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTX> declared in <root>.useTX' type=kotlin.Function0<T of <root>.useTX> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testWithNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>' type=kotlin.String origin=null
|
||||
<T>: kotlin.String
|
||||
x: CONST String type=kotlin.String value=""
|
||||
fn: FUN_EXPR type=kotlin.Function0<kotlin.String> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.testWithNullCheck'
|
||||
CALL 'public open fun notNullString (): kotlin.String declared in <root>.J' type=kotlin.String origin=null
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: nnStringVsTXString.kt
|
||||
fun <T> useTX(x: T, fn: () -> T) = fn()
|
||||
|
||||
fun testWithNullCheck {
|
||||
useTX("") { J.notNullString() }
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
FILE fqName:<root> fileName:/nnStringVsTXString.kt
|
||||
FUN name:useTX visibility:public modality:FINAL <T> (x:T of <root>.useTX, fn:kotlin.Function0<T of <root>.useTX>) returnType:T of <root>.useTX
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.useTX
|
||||
VALUE_PARAMETER name:fn index:1 type:kotlin.Function0<T of <root>.useTX>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTX origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTX> declared in <root>.useTX' type=kotlin.Function0<T of <root>.useTX> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testWithNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>' type=kotlin.String origin=null
|
||||
<T>: kotlin.String
|
||||
x: CONST String type=kotlin.String value=""
|
||||
fn: FUN_EXPR type=kotlin.Function0<kotlin.String> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.testWithNullCheck'
|
||||
CALL 'public open fun notNullString (): @[EnhancedNullability] kotlin.String declared in <root>.J' type=@[EnhancedNullability] kotlin.String origin=null
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
FILE fqName:<root> fileName:/stringVsT.kt
|
||||
FUN name:useT visibility:public modality:FINAL <T> (fn:kotlin.Function0<T of <root>.useT>) returnType:T of <root>.useT
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function0<T of <root>.useT>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useT <T> (fn: kotlin.Function0<T of <root>.useT>): T of <root>.useT declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useT origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useT> declared in <root>.useT' type=kotlin.Function0<T of <root>.useT> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testNoNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useT <T> (fn: kotlin.Function0<T of <root>.useT>): T of <root>.useT declared in <root>' type=kotlin.String? origin=null
|
||||
<T>: kotlin.String?
|
||||
fn: FUN_EXPR type=kotlin.Function0<kotlin.String?> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.String?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String? declared in <root>.testNoNullCheck'
|
||||
CALL 'public open fun string (): kotlin.String? declared in <root>.J' type=kotlin.String? origin=null
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: stringVsT.kt
|
||||
fun <T> useT(fn: () -> T) = fn()
|
||||
|
||||
fun testNoNullCheck() {
|
||||
useT { J.string() }
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
FILE fqName:<root> fileName:/stringVsT.kt
|
||||
FUN name:useT visibility:public modality:FINAL <T> (fn:kotlin.Function0<T of <root>.useT>) returnType:T of <root>.useT
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function0<T of <root>.useT>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useT <T> (fn: kotlin.Function0<T of <root>.useT>): T of <root>.useT declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useT origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useT> declared in <root>.useT' type=kotlin.Function0<T of <root>.useT> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testNoNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useT <T> (fn: kotlin.Function0<T of <root>.useT>): T of <root>.useT declared in <root>' type=@[FlexibleNullability] kotlin.String? origin=null
|
||||
<T>: @[FlexibleNullability] kotlin.String?
|
||||
fn: FUN_EXPR type=kotlin.Function0<@[FlexibleNullability] kotlin.String?> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:@[FlexibleNullability] kotlin.String?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): @[FlexibleNullability] kotlin.String? declared in <root>.testNoNullCheck'
|
||||
CALL 'public open fun string (): @[FlexibleNullability] kotlin.String? declared in <root>.J' type=@[FlexibleNullability] kotlin.String? origin=null
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
FILE fqName:<root> fileName:/stringVsTAny.kt
|
||||
FUN name:useTAny visibility:public modality:FINAL <T> (fn:kotlin.Function0<T of <root>.useTAny>) returnType:T of <root>.useTAny
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any]
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function0<T of <root>.useTAny>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTAny <T> (fn: kotlin.Function0<T of <root>.useTAny>): T of <root>.useTAny declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTAny origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTAny> declared in <root>.useTAny' type=kotlin.Function0<T of <root>.useTAny> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testNoNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTAny <T> (fn: kotlin.Function0<T of <root>.useTAny>): T of <root>.useTAny declared in <root>' type=kotlin.String? origin=null
|
||||
<T>: kotlin.String?
|
||||
fn: FUN_EXPR type=kotlin.Function0<kotlin.String?> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.String?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String? declared in <root>.testNoNullCheck'
|
||||
CALL 'public open fun string (): kotlin.String? declared in <root>.J' type=kotlin.String? origin=null
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: stringVsTAny.kt
|
||||
fun <T : Any> useTAny(fn: () -> T) = fn()
|
||||
|
||||
fun testNoNullCheck() {
|
||||
useTAny { J.string() }
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
FILE fqName:<root> fileName:/stringVsTAny.kt
|
||||
FUN name:useTAny visibility:public modality:FINAL <T> (fn:kotlin.Function0<T of <root>.useTAny>) returnType:T of <root>.useTAny
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any]
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function0<T of <root>.useTAny>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTAny <T> (fn: kotlin.Function0<T of <root>.useTAny>): T of <root>.useTAny declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTAny origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTAny> declared in <root>.useTAny' type=kotlin.Function0<T of <root>.useTAny> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testNoNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTAny <T> (fn: kotlin.Function0<T of <root>.useTAny>): T of <root>.useTAny declared in <root>' type=@[FlexibleNullability] kotlin.String? origin=null
|
||||
<T>: @[FlexibleNullability] kotlin.String?
|
||||
fn: FUN_EXPR type=kotlin.Function0<@[FlexibleNullability] kotlin.String?> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:@[FlexibleNullability] kotlin.String?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): @[FlexibleNullability] kotlin.String? declared in <root>.testNoNullCheck'
|
||||
CALL 'public open fun string (): @[FlexibleNullability] kotlin.String? declared in <root>.J' type=@[FlexibleNullability] kotlin.String? origin=null
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
FILE fqName:<root> fileName:/stringVsTConstrained.kt
|
||||
FUN name:useTConstrained visibility:public modality:FINAL <T> (xs:kotlin.Array<T of <root>.useTConstrained>, fn:kotlin.Function0<T of <root>.useTConstrained>) returnType:T of <root>.useTConstrained
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<T of <root>.useTConstrained>
|
||||
VALUE_PARAMETER name:fn index:1 type:kotlin.Function0<T of <root>.useTConstrained>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTConstrained <T> (xs: kotlin.Array<T of <root>.useTConstrained>, fn: kotlin.Function0<T of <root>.useTConstrained>): T of <root>.useTConstrained declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTConstrained origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTConstrained> declared in <root>.useTConstrained' type=kotlin.Function0<T of <root>.useTConstrained> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testWithNullCheck visibility:public modality:FINAL <> (xs:kotlin.Array<kotlin.String>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<kotlin.String>
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTConstrained <T> (xs: kotlin.Array<T of <root>.useTConstrained>, fn: kotlin.Function0<T of <root>.useTConstrained>): T of <root>.useTConstrained declared in <root>' type=kotlin.String origin=null
|
||||
<T>: kotlin.String
|
||||
xs: GET_VAR 'xs: kotlin.Array<kotlin.String> declared in <root>.testWithNullCheck' type=kotlin.Array<kotlin.String> origin=null
|
||||
fn: FUN_EXPR type=kotlin.Function0<kotlin.String> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.testWithNullCheck'
|
||||
CALL 'public open fun string (): kotlin.String? declared in <root>.J' type=kotlin.String? origin=null
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: stringVsTConstrained.kt
|
||||
fun <T> useTConstrained(xs: Array<T>, fn: () -> T) = fn()
|
||||
|
||||
fun testWithNullCheck(xs: Array<String>) {
|
||||
useTConstrained(xs) { J.string() }
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
FILE fqName:<root> fileName:/stringVsTConstrained.kt
|
||||
FUN name:useTConstrained visibility:public modality:FINAL <T> (xs:kotlin.Array<T of <root>.useTConstrained>, fn:kotlin.Function0<T of <root>.useTConstrained>) returnType:T of <root>.useTConstrained
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<T of <root>.useTConstrained>
|
||||
VALUE_PARAMETER name:fn index:1 type:kotlin.Function0<T of <root>.useTConstrained>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTConstrained <T> (xs: kotlin.Array<T of <root>.useTConstrained>, fn: kotlin.Function0<T of <root>.useTConstrained>): T of <root>.useTConstrained declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTConstrained origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTConstrained> declared in <root>.useTConstrained' type=kotlin.Function0<T of <root>.useTConstrained> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testWithNullCheck visibility:public modality:FINAL <> (xs:kotlin.Array<kotlin.String>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<kotlin.String>
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTConstrained <T> (xs: kotlin.Array<T of <root>.useTConstrained>, fn: kotlin.Function0<T of <root>.useTConstrained>): T of <root>.useTConstrained declared in <root>' type=kotlin.String origin=null
|
||||
<T>: kotlin.String
|
||||
xs: GET_VAR 'xs: kotlin.Array<kotlin.String> declared in <root>.testWithNullCheck' type=kotlin.Array<kotlin.String> origin=null
|
||||
fn: FUN_EXPR type=kotlin.Function0<kotlin.String> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.testWithNullCheck'
|
||||
TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String
|
||||
CALL 'public open fun string (): @[FlexibleNullability] kotlin.String? declared in <root>.J' type=@[FlexibleNullability] kotlin.String? origin=null
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
FILE fqName:<root> fileName:/stringVsTXArray.kt
|
||||
FUN name:useTX visibility:public modality:FINAL <T> (x:T of <root>.useTX, fn:kotlin.Function0<T of <root>.useTX>) returnType:T of <root>.useTX
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.useTX
|
||||
VALUE_PARAMETER name:fn index:1 type:kotlin.Function0<T of <root>.useTX>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTX origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTX> declared in <root>.useTX' type=kotlin.Function0<T of <root>.useTX> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testNoNullCheck visibility:public modality:FINAL <> (xs:kotlin.Array<kotlin.String>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<kotlin.String>
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>' type=java.io.Serializable? origin=null
|
||||
<T>: java.io.Serializable?
|
||||
x: GET_VAR 'xs: kotlin.Array<kotlin.String> declared in <root>.testNoNullCheck' type=kotlin.Array<kotlin.String> origin=null
|
||||
fn: FUN_EXPR type=kotlin.Function0<kotlin.String?> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.String?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String? declared in <root>.testNoNullCheck'
|
||||
CALL 'public open fun string (): kotlin.String? declared in <root>.J' type=kotlin.String? origin=null
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: stringVsTXArray.kt
|
||||
fun <T> useTX(x: T, fn: () -> T) = fn()
|
||||
|
||||
fun testNoNullCheck(xs: Array<String>) {
|
||||
useTX(xs) { J.string() }
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
FILE fqName:<root> fileName:/stringVsTXArray.kt
|
||||
FUN name:useTX visibility:public modality:FINAL <T> (x:T of <root>.useTX, fn:kotlin.Function0<T of <root>.useTX>) returnType:T of <root>.useTX
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.useTX
|
||||
VALUE_PARAMETER name:fn index:1 type:kotlin.Function0<T of <root>.useTX>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTX origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTX> declared in <root>.useTX' type=kotlin.Function0<T of <root>.useTX> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testNoNullCheck visibility:public modality:FINAL <> (xs:kotlin.Array<kotlin.String>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<kotlin.String>
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>' type=@[FlexibleNullability] java.io.Serializable? origin=null
|
||||
<T>: @[FlexibleNullability] java.io.Serializable?
|
||||
x: GET_VAR 'xs: kotlin.Array<kotlin.String> declared in <root>.testNoNullCheck' type=kotlin.Array<kotlin.String> origin=null
|
||||
fn: FUN_EXPR type=kotlin.Function0<@[FlexibleNullability] java.io.Serializable?> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:@[FlexibleNullability] java.io.Serializable?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): @[FlexibleNullability] java.io.Serializable? declared in <root>.testNoNullCheck'
|
||||
CALL 'public open fun string (): @[FlexibleNullability] kotlin.String? declared in <root>.J' type=@[FlexibleNullability] kotlin.String? origin=null
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
FILE fqName:<root> fileName:/stringVsTXString.kt
|
||||
FUN name:useTX visibility:public modality:FINAL <T> (x:T of <root>.useTX, fn:kotlin.Function0<T of <root>.useTX>) returnType:T of <root>.useTX
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.useTX
|
||||
VALUE_PARAMETER name:fn index:1 type:kotlin.Function0<T of <root>.useTX>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTX origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTX> declared in <root>.useTX' type=kotlin.Function0<T of <root>.useTX> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testNoNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>' type=kotlin.String? origin=null
|
||||
<T>: kotlin.String?
|
||||
x: CONST String type=kotlin.String value=""
|
||||
fn: FUN_EXPR type=kotlin.Function0<kotlin.String?> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.String?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String? declared in <root>.testNoNullCheck'
|
||||
CALL 'public open fun string (): kotlin.String? declared in <root>.J' type=kotlin.String? origin=null
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: stringVsTXString.kt
|
||||
fun <T> useTX(x: T, fn: () -> T) = fn()
|
||||
|
||||
fun testNoNullCheck() {
|
||||
useTX("") { J.string() }
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class J {
|
||||
public static String string() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @NotNull String notNullString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
FILE fqName:<root> fileName:/stringVsTXString.kt
|
||||
FUN name:useTX visibility:public modality:FINAL <T> (x:T of <root>.useTX, fn:kotlin.Function0<T of <root>.useTX>) returnType:T of <root>.useTX
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.useTX
|
||||
VALUE_PARAMETER name:fn index:1 type:kotlin.Function0<T of <root>.useTX>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.useTX origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.useTX> declared in <root>.useTX' type=kotlin.Function0<T of <root>.useTX> origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:testNoNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun useTX <T> (x: T of <root>.useTX, fn: kotlin.Function0<T of <root>.useTX>): T of <root>.useTX declared in <root>' type=@[FlexibleNullability] kotlin.String? origin=null
|
||||
<T>: @[FlexibleNullability] kotlin.String?
|
||||
x: CONST String type=kotlin.String value=""
|
||||
fn: FUN_EXPR type=kotlin.Function0<@[FlexibleNullability] kotlin.String?> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:@[FlexibleNullability] kotlin.String?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): @[FlexibleNullability] kotlin.String? declared in <root>.testNoNullCheck'
|
||||
CALL 'public open fun string (): @[FlexibleNullability] kotlin.String? declared in <root>.J' type=@[FlexibleNullability] kotlin.String? origin=null
|
||||
+63
@@ -17379,6 +17379,69 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class NullCheckOnLambdaReturnValue extends AbstractBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNullCheckOnLambdaReturnValue() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsT.kt")
|
||||
public void testNnStringVsT() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsT.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTAny.kt")
|
||||
public void testNnStringVsTAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTConstrained.kt")
|
||||
public void testNnStringVsTConstrained() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTConstrained.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTXArray.kt")
|
||||
public void testNnStringVsTXArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTXArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTXString.kt")
|
||||
public void testNnStringVsTXString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTXString.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsT.kt")
|
||||
public void testStringVsT() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsT.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTAny.kt")
|
||||
public void testStringVsTAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTConstrained.kt")
|
||||
public void testStringVsTConstrained() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTConstrained.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTXArray.kt")
|
||||
public void testStringVsTXArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTXArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTXString.kt")
|
||||
public void testStringVsTXString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTXString.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/objectMethods")
|
||||
|
||||
+63
@@ -17379,6 +17379,69 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class NullCheckOnLambdaReturnValue extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNullCheckOnLambdaReturnValue() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsT.kt")
|
||||
public void testNnStringVsT() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsT.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTAny.kt")
|
||||
public void testNnStringVsTAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTConstrained.kt")
|
||||
public void testNnStringVsTConstrained() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTConstrained.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTXArray.kt")
|
||||
public void testNnStringVsTXArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTXArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTXString.kt")
|
||||
public void testNnStringVsTXString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTXString.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsT.kt")
|
||||
public void testStringVsT() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsT.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTAny.kt")
|
||||
public void testStringVsTAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTConstrained.kt")
|
||||
public void testStringVsTConstrained() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTConstrained.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTXArray.kt")
|
||||
public void testStringVsTXArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTXArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTXString.kt")
|
||||
public void testStringVsTXString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTXString.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/objectMethods")
|
||||
|
||||
+63
@@ -15979,6 +15979,69 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class NullCheckOnLambdaReturnValue extends AbstractIrBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNullCheckOnLambdaReturnValue() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsT.kt")
|
||||
public void testNnStringVsT() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsT.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTAny.kt")
|
||||
public void testNnStringVsTAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTConstrained.kt")
|
||||
public void testNnStringVsTConstrained() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTConstrained.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTXArray.kt")
|
||||
public void testNnStringVsTXArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTXArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTXString.kt")
|
||||
public void testNnStringVsTXString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/nnStringVsTXString.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsT.kt")
|
||||
public void testStringVsT() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsT.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTAny.kt")
|
||||
public void testStringVsTAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTConstrained.kt")
|
||||
public void testStringVsTConstrained() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTConstrained.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTXArray.kt")
|
||||
public void testStringVsTXArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTXArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTXString.kt")
|
||||
public void testStringVsTXString() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue/stringVsTXString.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/objectMethods")
|
||||
|
||||
@@ -2160,6 +2160,69 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
|
||||
public void testPlatformTypeReceiver() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class NullCheckOnLambdaResult extends AbstractIrTextTestCase {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNullCheckOnLambdaResult() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsT.kt")
|
||||
public void testNnStringVsT() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsT.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTAny.kt")
|
||||
public void testNnStringVsTAny() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTConstrained.kt")
|
||||
public void testNnStringVsTConstrained() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTXArray.kt")
|
||||
public void testNnStringVsTXArray() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nnStringVsTXString.kt")
|
||||
public void testNnStringVsTXString() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXString.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsT.kt")
|
||||
public void testStringVsT() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTAny.kt")
|
||||
public void testStringVsTAny() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTConstrained.kt")
|
||||
public void testStringVsTConstrained() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTXArray.kt")
|
||||
public void testStringVsTXArray() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringVsTXString.kt")
|
||||
public void testStringVsTXString() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+13
@@ -13724,6 +13724,19 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class NullCheckOnLambdaReturnValue extends AbstractIrJsCodegenBoxES6Test {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNullCheckOnLambdaReturnValue() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/objectMethods")
|
||||
|
||||
Generated
+13
@@ -13724,6 +13724,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class NullCheckOnLambdaReturnValue extends AbstractIrJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNullCheckOnLambdaReturnValue() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/objectMethods")
|
||||
|
||||
+13
@@ -13789,6 +13789,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class NullCheckOnLambdaReturnValue extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNullCheckOnLambdaReturnValue() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/objectMethods")
|
||||
|
||||
Reference in New Issue
Block a user