diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBody.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBody.kt new file mode 100644 index 00000000000..f7b2c2654df --- /dev/null +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBody.kt @@ -0,0 +1,29 @@ +// TARGET_BACKEND: JVM +// STRICT_JAVA_NULLABILITY_ASSERTIONS + +// FILE: box.kt +fun box(): String { + try { + J().test() + return "Fail: should throw" + } + catch (e: Throwable) { + return "OK" + } +} + +// FILE: test.kt +fun withAssertion(j: J) = j.nullString() + +// FILE: J.java +import org.jetbrains.annotations.NotNull; + +public class J { + public @NotNull String nullString() { + return null; + } + + public void test() { + TestKt.withAssertion(this); + } +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt new file mode 100644 index 00000000000..74e2c3a70bf --- /dev/null +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt @@ -0,0 +1,34 @@ +// TARGET_BACKEND: JVM +// STRICT_JAVA_NULLABILITY_ASSERTIONS + +// See KT-8135 +// We could generate runtime assertion on call site for 'generic()' below. + +// FILE: box.kt +fun box(): String { + try { + J().test() + return "OK" + } + catch (e: Throwable) { + return "Fail: SHOULD NOT throw" + } +} + +// FILE: test.kt +fun withAssertion(j: J) = generic(j) + +fun generic(j: J) = j.nullT() + +// FILE: J.java +import org.jetbrains.annotations.NotNull; + +public class J { + public @NotNull T nullT() { + return null; + } + + public void test() { + TestKt.withAssertion(this); + } +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalFunctionWithExpressionBody.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalFunctionWithExpressionBody.kt new file mode 100644 index 00000000000..29dc4850156 --- /dev/null +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalFunctionWithExpressionBody.kt @@ -0,0 +1,28 @@ +// TARGET_BACKEND: JVM +// STRICT_JAVA_NULLABILITY_ASSERTIONS + +// FILE: box.kt +fun box(): String { + try { + outer() + return "Fail: should throw" + } + catch (e: Throwable) { + return "OK" + } +} + +// FILE: test.kt +fun outer() { + fun withAssertion() = J().nullString() + withAssertion() // NB not used itself +} + +// FILE: J.java +import org.jetbrains.annotations.NotNull; + +public class J { + public @NotNull String nullString() { + return null; + } +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalVariableInitializer.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalVariableInitializer.kt new file mode 100644 index 00000000000..6c2df07de45 --- /dev/null +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalVariableInitializer.kt @@ -0,0 +1,31 @@ +// TARGET_BACKEND: JVM +// STRICT_JAVA_NULLABILITY_ASSERTIONS + +// FILE: box.kt +fun box(): String { + try { + J().test() + return "Fail: should throw" + } + catch (e: Throwable) { + return "OK" + } +} + +// FILE: test.kt +fun withAssertion(j: J) { + val x = j.nullString() +} + +// FILE: J.java +import org.jetbrains.annotations.NotNull; + +public class J { + public @NotNull String nullString() { + return null; + } + + public void test() { + TestKt.withAssertion(this); + } +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inMemberPropertyInitializer.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inMemberPropertyInitializer.kt new file mode 100644 index 00000000000..38c8d587615 --- /dev/null +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inMemberPropertyInitializer.kt @@ -0,0 +1,31 @@ +// TARGET_BACKEND: JVM +// STRICT_JAVA_NULLABILITY_ASSERTIONS + +// FILE: box.kt +fun box(): String { + try { + J().test() + return "Fail: should throw" + } + catch (e: Throwable) { + return "OK" + } +} + +// FILE: test.kt +class C { + val withAssertion = J().nullString() +} + +// FILE: J.java +import org.jetbrains.annotations.NotNull; + +public class J { + public @NotNull String nullString() { + return null; + } + + public Object test() { + return new C(); + } +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inPropertyGetterWithExpressionBody.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inPropertyGetterWithExpressionBody.kt new file mode 100644 index 00000000000..84f13f3a8c0 --- /dev/null +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inPropertyGetterWithExpressionBody.kt @@ -0,0 +1,29 @@ +// TARGET_BACKEND: JVM +// STRICT_JAVA_NULLABILITY_ASSERTIONS + +// FILE: box.kt +fun box(): String { + try { + J().test() + return "Fail: should throw" + } + catch (e: Throwable) { + return "OK" + } +} + +// FILE: test.kt +val withAssertion get() = J().nullString() + +// FILE: J.java +import org.jetbrains.annotations.NotNull; + +public class J { + public @NotNull String nullString() { + return null; + } + + public void test() { + TestKt.getWithAssertion(); + } +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt new file mode 100644 index 00000000000..5d2e21b1d53 --- /dev/null +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt @@ -0,0 +1,31 @@ +// TARGET_BACKEND: JVM +// STRICT_JAVA_NULLABILITY_ASSERTIONS + +// FILE: box.kt +fun box(): String { + try { + J().test() + return "Fail: should throw" + } + catch (e: Throwable) { + return "OK" + } +} + +// FILE: test.kt +val withAssertion = J().nullString() + +fun clinitTrigger() {} + +// FILE: J.java +import org.jetbrains.annotations.NotNull; + +public class J { + public @NotNull String nullString() { + return null; + } + + public void test() { + TestKt.clinitTrigger(); + } +} \ No newline at end of file diff --git a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index de8829b43cc..59c1113776d 100644 --- a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -10174,17 +10174,134 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } + @TestMetadata("destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt") + public void testDestructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); + doTest(fileName); + } + @TestMetadata("extensionReceiverParameter.kt") public void testExtensionReceiverParameter() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/extensionReceiverParameter.kt"); doTest(fileName); } + @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt") + public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt"); + doTest(fileName); + } + + @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt") + public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv11.kt") + public void testIncWithNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt"); + doTest(fileName); + } + + @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv12.kt") + public void testIncWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); + doTest(fileName); + } + @TestMetadata("mapPut.kt") public void testMapPut() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt"); doTest(fileName); } + + @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv11.kt") + public void testNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv11.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv12.kt") + public void testNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt") + public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv11() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt") + public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnMemberExtensionReceiver_lv12.kt") + public void testNullabilityAssertionOnMemberExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt") + public void testNullabilityAssertionOnPrivateMemberExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class EnhancedNullability extends AbstractIrBlackBoxCodegenTest { + public void testAllFilesPresentInEnhancedNullability() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("inFunctionWithExpressionBody.kt") + public void testInFunctionWithExpressionBody() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBody.kt"); + doTest(fileName); + } + + @TestMetadata("inFunctionWithExpressionBodyWithJavaGeneric.kt") + public void testInFunctionWithExpressionBodyWithJavaGeneric() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt"); + doTest(fileName); + } + + @TestMetadata("inLocalFunctionWithExpressionBody.kt") + public void testInLocalFunctionWithExpressionBody() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalFunctionWithExpressionBody.kt"); + doTest(fileName); + } + + @TestMetadata("inLocalVariableInitializer.kt") + public void testInLocalVariableInitializer() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalVariableInitializer.kt"); + doTest(fileName); + } + + @TestMetadata("inMemberPropertyInitializer.kt") + public void testInMemberPropertyInitializer() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inMemberPropertyInitializer.kt"); + doTest(fileName); + } + + @TestMetadata("inPropertyGetterWithExpressionBody.kt") + public void testInPropertyGetterWithExpressionBody() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inPropertyGetterWithExpressionBody.kt"); + doTest(fileName); + } + + @TestMetadata("inTopLevelPropertyInitializer.kt") + public void testInTopLevelPropertyInitializer() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt"); + doTest(fileName); + } + } } @TestMetadata("compiler/testData/codegen/box/javaInterop/objectMethods") @@ -11910,81 +12027,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } - @TestMetadata("compiler/testData/codegen/box/nullabilityAssertions") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NullabilityAssertions extends AbstractIrBlackBoxCodegenTest { - public void testAllFilesPresentInNullabilityAssertions() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/nullabilityAssertions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt") - public void testDestructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt") - public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt"); - doTest(fileName); - } - - @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt") - public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv11.kt") - public void testIncWithNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt"); - doTest(fileName); - } - - @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv12.kt") - public void testIncWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv11.kt") - public void testNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnExtensionReceiver_lv11.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv12.kt") - public void testNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt") - public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt") - public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnMemberExtensionReceiver_lv12.kt") - public void testNullabilityAssertionOnMemberExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt") - public void testNullabilityAssertionOnPrivateMemberExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt"); - doTest(fileName); - } - } - @TestMetadata("compiler/testData/codegen/box/objectIntrinsics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index be3d2985ee3..8bb5b7fc27f 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -10174,17 +10174,134 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } + @TestMetadata("destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt") + public void testDestructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); + doTest(fileName); + } + @TestMetadata("extensionReceiverParameter.kt") public void testExtensionReceiverParameter() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/extensionReceiverParameter.kt"); doTest(fileName); } + @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt") + public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt"); + doTest(fileName); + } + + @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt") + public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv11.kt") + public void testIncWithNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt"); + doTest(fileName); + } + + @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv12.kt") + public void testIncWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); + doTest(fileName); + } + @TestMetadata("mapPut.kt") public void testMapPut() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt"); doTest(fileName); } + + @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv11.kt") + public void testNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv11.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv12.kt") + public void testNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt") + public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv11() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt") + public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnMemberExtensionReceiver_lv12.kt") + public void testNullabilityAssertionOnMemberExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt") + public void testNullabilityAssertionOnPrivateMemberExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class EnhancedNullability extends AbstractBlackBoxCodegenTest { + public void testAllFilesPresentInEnhancedNullability() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("inFunctionWithExpressionBody.kt") + public void testInFunctionWithExpressionBody() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBody.kt"); + doTest(fileName); + } + + @TestMetadata("inFunctionWithExpressionBodyWithJavaGeneric.kt") + public void testInFunctionWithExpressionBodyWithJavaGeneric() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt"); + doTest(fileName); + } + + @TestMetadata("inLocalFunctionWithExpressionBody.kt") + public void testInLocalFunctionWithExpressionBody() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalFunctionWithExpressionBody.kt"); + doTest(fileName); + } + + @TestMetadata("inLocalVariableInitializer.kt") + public void testInLocalVariableInitializer() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalVariableInitializer.kt"); + doTest(fileName); + } + + @TestMetadata("inMemberPropertyInitializer.kt") + public void testInMemberPropertyInitializer() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inMemberPropertyInitializer.kt"); + doTest(fileName); + } + + @TestMetadata("inPropertyGetterWithExpressionBody.kt") + public void testInPropertyGetterWithExpressionBody() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inPropertyGetterWithExpressionBody.kt"); + doTest(fileName); + } + + @TestMetadata("inTopLevelPropertyInitializer.kt") + public void testInTopLevelPropertyInitializer() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt"); + doTest(fileName); + } + } } @TestMetadata("compiler/testData/codegen/box/javaInterop/objectMethods") @@ -11910,81 +12027,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } - @TestMetadata("compiler/testData/codegen/box/nullabilityAssertions") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NullabilityAssertions extends AbstractBlackBoxCodegenTest { - public void testAllFilesPresentInNullabilityAssertions() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/nullabilityAssertions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt") - public void testDestructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt") - public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt"); - doTest(fileName); - } - - @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt") - public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv11.kt") - public void testIncWithNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt"); - doTest(fileName); - } - - @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv12.kt") - public void testIncWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv11.kt") - public void testNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnExtensionReceiver_lv11.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv12.kt") - public void testNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt") - public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt") - public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnMemberExtensionReceiver_lv12.kt") - public void testNullabilityAssertionOnMemberExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt") - public void testNullabilityAssertionOnPrivateMemberExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt"); - doTest(fileName); - } - } - @TestMetadata("compiler/testData/codegen/box/objectIntrinsics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 96832c02488..8af073d8d1a 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -10174,17 +10174,134 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } + @TestMetadata("destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt") + public void testDestructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); + doTest(fileName); + } + @TestMetadata("extensionReceiverParameter.kt") public void testExtensionReceiverParameter() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/extensionReceiverParameter.kt"); doTest(fileName); } + @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt") + public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt"); + doTest(fileName); + } + + @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt") + public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv11.kt") + public void testIncWithNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt"); + doTest(fileName); + } + + @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv12.kt") + public void testIncWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); + doTest(fileName); + } + @TestMetadata("mapPut.kt") public void testMapPut() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt"); doTest(fileName); } + + @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv11.kt") + public void testNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv11.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv12.kt") + public void testNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt") + public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv11() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt") + public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnMemberExtensionReceiver_lv12.kt") + public void testNullabilityAssertionOnMemberExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt") + public void testNullabilityAssertionOnPrivateMemberExtensionReceiver_lv12() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt"); + doTest(fileName); + } + + @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class EnhancedNullability extends AbstractLightAnalysisModeTest { + public void testAllFilesPresentInEnhancedNullability() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("inFunctionWithExpressionBody.kt") + public void testInFunctionWithExpressionBody() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBody.kt"); + doTest(fileName); + } + + @TestMetadata("inFunctionWithExpressionBodyWithJavaGeneric.kt") + public void testInFunctionWithExpressionBodyWithJavaGeneric() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt"); + doTest(fileName); + } + + @TestMetadata("inLocalFunctionWithExpressionBody.kt") + public void testInLocalFunctionWithExpressionBody() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalFunctionWithExpressionBody.kt"); + doTest(fileName); + } + + @TestMetadata("inLocalVariableInitializer.kt") + public void testInLocalVariableInitializer() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalVariableInitializer.kt"); + doTest(fileName); + } + + @TestMetadata("inMemberPropertyInitializer.kt") + public void testInMemberPropertyInitializer() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inMemberPropertyInitializer.kt"); + doTest(fileName); + } + + @TestMetadata("inPropertyGetterWithExpressionBody.kt") + public void testInPropertyGetterWithExpressionBody() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inPropertyGetterWithExpressionBody.kt"); + doTest(fileName); + } + + @TestMetadata("inTopLevelPropertyInitializer.kt") + public void testInTopLevelPropertyInitializer() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt"); + doTest(fileName); + } + } } @TestMetadata("compiler/testData/codegen/box/javaInterop/objectMethods") @@ -11910,81 +12027,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } - @TestMetadata("compiler/testData/codegen/box/nullabilityAssertions") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NullabilityAssertions extends AbstractLightAnalysisModeTest { - public void testAllFilesPresentInNullabilityAssertions() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/nullabilityAssertions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); - } - - @TestMetadata("destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt") - public void testDestructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt") - public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt"); - doTest(fileName); - } - - @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt") - public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv11.kt") - public void testIncWithNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt"); - doTest(fileName); - } - - @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv12.kt") - public void testIncWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv11.kt") - public void testNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnExtensionReceiver_lv11.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv12.kt") - public void testNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt") - public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt") - public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnMemberExtensionReceiver_lv12.kt") - public void testNullabilityAssertionOnMemberExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt"); - doTest(fileName); - } - - @TestMetadata("nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt") - public void testNullabilityAssertionOnPrivateMemberExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullabilityAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt"); - doTest(fileName); - } - } - @TestMetadata("compiler/testData/codegen/box/objectIntrinsics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 49b4f98469b..9572d082882 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -11157,6 +11157,15 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt"); doTest(fileName); } + + @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class EnhancedNullability extends AbstractJsCodegenBoxTest { + public void testAllFilesPresentInEnhancedNullability() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + } } @TestMetadata("compiler/testData/codegen/box/javaInterop/objectMethods") @@ -13110,15 +13119,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } - @TestMetadata("compiler/testData/codegen/box/nullabilityAssertions") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NullabilityAssertions extends AbstractJsCodegenBoxTest { - public void testAllFilesPresentInNullabilityAssertions() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/nullabilityAssertions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); - } - } - @TestMetadata("compiler/testData/codegen/box/objectIntrinsics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)