From 753ba99b04a9012a66f7cae0c837096cd5c2f902 Mon Sep 17 00:00:00 2001 From: "Denis.Zharkov" Date: Mon, 16 Aug 2021 18:12:51 +0300 Subject: [PATCH] FIR: Support enhanced types when checking if Java type is primitive --- .../expresssions/genericDiagnostic.fir.txt | 2 +- ...irOldFrontendDiagnosticsTestGenerated.java | 6 +++++ ...DiagnosticsWithLightTreeTestGenerated.java | 6 +++++ .../jetbrains/kotlin/fir/types/ConeTypes.kt | 7 +++--- .../fir/java/scopes/JavaOverrideChecker.kt | 3 +-- .../fir/resolve/substitution/Substitutors.kt | 5 +++- .../jetbrains/kotlin/fir/types/TypeUtils.kt | 9 +++++++- .../tests/j+k/integerNotNullable.kt | 23 +++++++++++++++++++ .../tests/j+k/integerNotNullable.txt | 20 ++++++++++++++++ .../notNullAnnotated.fir.kt | 22 ------------------ .../primitiveOverrides/notNullAnnotated.kt | 1 + .../ir/irText/classes/kt43217.fir.txt | 18 +++++++++++++-- .../firProblems/AbstractMutableMap.fir.txt | 6 ++--- .../test/runners/DiagnosticTestGenerated.java | 6 +++++ ...CompilerTestFE10TestdataTestGenerated.java | 6 +++++ 15 files changed, 104 insertions(+), 36 deletions(-) create mode 100644 compiler/testData/diagnostics/tests/j+k/integerNotNullable.kt create mode 100644 compiler/testData/diagnostics/tests/j+k/integerNotNullable.txt delete mode 100644 compiler/testData/diagnostics/tests/j+k/primitiveOverrides/notNullAnnotated.fir.kt diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/genericDiagnostic.fir.txt b/compiler/fir/analysis-tests/testData/resolve/expresssions/genericDiagnostic.fir.txt index cc161aa2fcd..c96ee4da060 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/genericDiagnostic.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/genericDiagnostic.fir.txt @@ -16,7 +16,7 @@ FILE: test.kt private final val DERIVED_FACTORY: R|DiagnosticFactory0>| = R|/DiagnosticFactory0.DiagnosticFactory0||>() private get(): R|DiagnosticFactory0>| public final fun createViaFactory(d: R|EmptyDiagnostic|): R|kotlin/Unit| { - lval casted: R|Diagnostic>| = R|/DERIVED_FACTORY|.R|SubstitutionOverride>|>|(R|/d|) + lval casted: R|Diagnostic>| = R|/DERIVED_FACTORY|.R|SubstitutionOverride>|>|(R|/d|) lval element: R|DerivedElement| = R|/casted|.R|/Diagnostic.element| R|/Fix.Fix|(R|/element|) } diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java index 105d80fe040..38b59a7106a 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java @@ -16855,6 +16855,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/j+k/innerNestedClassFromJava.kt"); } + @Test + @TestMetadata("integerNotNullable.kt") + public void testIntegerNotNullable() throws Exception { + runTest("compiler/testData/diagnostics/tests/j+k/integerNotNullable.kt"); + } + @Test @TestMetadata("invisiblePackagePrivateInheritedMember.kt") public void testInvisiblePackagePrivateInheritedMember() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java index 1687ffd2f6e..db9489ebd61 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java @@ -16855,6 +16855,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/j+k/innerNestedClassFromJava.kt"); } + @Test + @TestMetadata("integerNotNullable.kt") + public void testIntegerNotNullable() throws Exception { + runTest("compiler/testData/diagnostics/tests/j+k/integerNotNullable.kt"); + } + @Test @TestMetadata("invisiblePackagePrivateInheritedMember.kt") public void testInvisiblePackagePrivateInheritedMember() throws Exception { diff --git a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeTypes.kt b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeTypes.kt index 69c4f6ab740..07c9ac3d639 100644 --- a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeTypes.kt +++ b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeTypes.kt @@ -212,11 +212,10 @@ data class ConeCapturedType( data class ConeTypeVariableType( override val nullability: ConeNullability, - override val lookupTag: ConeClassifierLookupTag + override val lookupTag: ConeClassifierLookupTag, + override val attributes: ConeAttributes = ConeAttributes.Empty, ) : ConeLookupTagBasedType() { override val typeArguments: Array get() = emptyArray() - - override val attributes: ConeAttributes get() = ConeAttributes.Empty } data class ConeDefinitelyNotNullType(val original: ConeKotlinType) : ConeSimpleKotlinType(), DefinitelyNotNullTypeMarker { @@ -227,7 +226,7 @@ data class ConeDefinitelyNotNullType(val original: ConeKotlinType) : ConeSimpleK get() = ConeNullability.NOT_NULL override val attributes: ConeAttributes - get() = ConeAttributes.Empty + get() = original.attributes companion object } diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaOverrideChecker.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaOverrideChecker.kt index a2480e1029d..71c53b9fb95 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaOverrideChecker.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaOverrideChecker.kt @@ -80,8 +80,7 @@ class JavaOverrideChecker internal constructor( } private fun ConeKotlinType.isPrimitiveInJava(): Boolean = with(context) { - // TODO: Support enhanced type like `@NotNull Integer` that are not nullable, but still aren't primitive - !isNullableType() && isPrimitiveOrNullablePrimitive + !isNullableType() && CompilerConeAttributes.EnhancedNullability !in attributes && isPrimitiveOrNullablePrimitive } private fun isEqualArrayElementTypeProjections( diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/substitution/Substitutors.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/substitution/Substitutors.kt index 5a7cc7d9cc9..ae53e0d4c3d 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/substitution/Substitutors.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/substitution/Substitutors.kt @@ -84,7 +84,10 @@ abstract class AbstractConeSubstitutor(private val typeContext: ConeTypeContext) } private fun ConeDefinitelyNotNullType.substituteOriginal(): ConeKotlinType? { - val substituted = substituteOrNull(original)?.withNullability(ConeNullability.NOT_NULL, typeContext) ?: return null + val substituted = substituteOrNull(original) + ?.withNullability(ConeNullability.NOT_NULL, typeContext) + ?.withAttributes(original.attributes, typeContext) + ?: return null return ConeDefinitelyNotNullType.create(substituted, typeContext) ?: substituted } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt index dcb44262457..68ae4f236e8 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt @@ -13,8 +13,8 @@ import org.jetbrains.kotlin.fir.diagnostics.ConeSimpleDiagnostic import org.jetbrains.kotlin.fir.resolve.fullyExpandedType import org.jetbrains.kotlin.fir.resolve.substitution.substitutorByMap import org.jetbrains.kotlin.fir.resolve.toSymbol -import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol import org.jetbrains.kotlin.fir.symbols.ConeTypeParameterLookupTag +import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol import org.jetbrains.kotlin.fir.symbols.impl.ConeClassLookupTagWithFixedSymbol import org.jetbrains.kotlin.fir.types.builder.buildErrorTypeRef import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef @@ -110,6 +110,13 @@ fun T.withAttributes(attributes: ConeAttributes, typeSystem lowerBound.withAttributes(attributes, typeSystemContext), upperBound.withAttributes(attributes, typeSystemContext) ) + is ConeTypeVariableType -> ConeTypeVariableType(nullability, lookupTag, attributes) + is ConeCapturedType -> ConeCapturedType( + captureStatus, lowerType, nullability, constructor, attributes, isProjectionNotNull, + ) + // TODO: Consider correct application of attributes to ConeIntersectionType + // Currently, ConeAttributes.union works a bit strange, because it lefts only `other` parts + is ConeIntersectionType -> this else -> error("Not supported: $this: ${this.render()}") } as T } diff --git a/compiler/testData/diagnostics/tests/j+k/integerNotNullable.kt b/compiler/testData/diagnostics/tests/j+k/integerNotNullable.kt new file mode 100644 index 00000000000..26cc6b507e4 --- /dev/null +++ b/compiler/testData/diagnostics/tests/j+k/integerNotNullable.kt @@ -0,0 +1,23 @@ +// FIR_IDENTICAL +// FILE: Box.java +import org.jetbrains.annotations.NotNull; + +public class Box { + public void put(@NotNull T t) {} +} + +// FILE: IntBox.java +import org.jetbrains.annotations.NotNull; + +public class IntBox extends Box { + public int result = 0; + @Override + public void put(@NotNull Integer t) { + result = t; + } +} + +// FILE: main.kt +fun main() { + IntBox().put(1) +} diff --git a/compiler/testData/diagnostics/tests/j+k/integerNotNullable.txt b/compiler/testData/diagnostics/tests/j+k/integerNotNullable.txt new file mode 100644 index 00000000000..cec1ff08347 --- /dev/null +++ b/compiler/testData/diagnostics/tests/j+k/integerNotNullable.txt @@ -0,0 +1,20 @@ +package + +public fun main(): kotlin.Unit + +public open class Box { + public constructor Box() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open fun put(/*0*/ @org.jetbrains.annotations.NotNull t: T!!): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public open class IntBox : Box { + public constructor IntBox() + public final var result: kotlin.Int + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + @java.lang.Override public open override /*1*/ fun put(/*0*/ @org.jetbrains.annotations.NotNull t: kotlin.Int): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/tests/j+k/primitiveOverrides/notNullAnnotated.fir.kt b/compiler/testData/diagnostics/tests/j+k/primitiveOverrides/notNullAnnotated.fir.kt deleted file mode 100644 index d309f556472..00000000000 --- a/compiler/testData/diagnostics/tests/j+k/primitiveOverrides/notNullAnnotated.fir.kt +++ /dev/null @@ -1,22 +0,0 @@ -// FILE: A.java -import org.jetbrains.annotations.*; - -public class A { - public void foo(int x) {} - public void bar(@NotNull Double x) {} -} - -// FILE: B.java -import org.jetbrains.annotations.*; -public class B extends A { - public void foo(@NotNull Integer x) {} - public void bar(double x) {} -} - -// FILE: main.kt - -fun foo(b: B) { - // See KT-9182 - b.foo(1) - b.bar(2.0) -} diff --git a/compiler/testData/diagnostics/tests/j+k/primitiveOverrides/notNullAnnotated.kt b/compiler/testData/diagnostics/tests/j+k/primitiveOverrides/notNullAnnotated.kt index 36ce0a1aa39..18fb296298a 100644 --- a/compiler/testData/diagnostics/tests/j+k/primitiveOverrides/notNullAnnotated.kt +++ b/compiler/testData/diagnostics/tests/j+k/primitiveOverrides/notNullAnnotated.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FILE: A.java import org.jetbrains.annotations.*; diff --git a/compiler/testData/ir/irText/classes/kt43217.fir.txt b/compiler/testData/ir/irText/classes/kt43217.fir.txt index 5b0e8f44fe7..d1f089f49d7 100644 --- a/compiler/testData/ir/irText/classes/kt43217.fir.txt +++ b/compiler/testData/ir/irText/classes/kt43217.fir.txt @@ -17,7 +17,7 @@ FILE fqName: fileName:/kt43217.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[.DoubleExpression]' FUN name:get visibility:public modality:FINAL <> ($this:.A.b.) returnType:kotlin.Double [operator] overridden: - public abstract fun get (): kotlin.Double [fake_override,operator] declared in .DoubleExpression + public abstract fun get (): @[EnhancedNullability] kotlin.Double [fake_override,operator] declared in .DoubleExpression $this: VALUE_PARAMETER name: type:.A.b. BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun get (): kotlin.Double [operator] declared in .A.b.' @@ -30,6 +30,13 @@ FILE fqName: fileName:/kt43217.kt public open fun isEqualTo (value: kotlin.Double): @[EnhancedNullability] @[Override] kotlin.Any declared in .DoubleExpression $this: VALUE_PARAMETER name: type:.DoubleExpression VALUE_PARAMETER name:value index:0 type:kotlin.Double + FUN FAKE_OVERRIDE name:isEqualTo visibility:public modality:OPEN <> ($this:.ObservableValue.ObservableValue>, value:@[EnhancedNullability] kotlin.Double) returnType:@[EnhancedNullability] kotlin.Any [fake_override] + annotations: + NotNull(value = ) + overridden: + public open fun isEqualTo (value: @[EnhancedNullability] kotlin.Double): @[EnhancedNullability] kotlin.Any [fake_override] declared in .DoubleExpression + $this: VALUE_PARAMETER name: type:.ObservableValue.ObservableValue> + VALUE_PARAMETER name:value index:0 type:@[EnhancedNullability] kotlin.Double 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 [fake_override,operator] declared in .DoubleExpression @@ -72,7 +79,7 @@ FILE fqName: fileName:/kt43217.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.DoubleExpression]' FUN name:get visibility:public modality:FINAL <> ($this:.C) returnType:kotlin.Double [operator] overridden: - public abstract fun get (): kotlin.Double [fake_override,operator] declared in .DoubleExpression + public abstract fun get (): @[EnhancedNullability] kotlin.Double [fake_override,operator] declared in .DoubleExpression $this: VALUE_PARAMETER name: type:.C BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun get (): kotlin.Double [operator] declared in .C' @@ -85,6 +92,13 @@ FILE fqName: fileName:/kt43217.kt public open fun isEqualTo (value: kotlin.Double): @[EnhancedNullability] @[Override] kotlin.Any declared in .DoubleExpression $this: VALUE_PARAMETER name: type:.DoubleExpression VALUE_PARAMETER name:value index:0 type:kotlin.Double + FUN FAKE_OVERRIDE name:isEqualTo visibility:public modality:OPEN <> ($this:.ObservableValue.ObservableValue>, value:@[EnhancedNullability] kotlin.Double) returnType:@[EnhancedNullability] kotlin.Any [fake_override] + annotations: + NotNull(value = ) + overridden: + public open fun isEqualTo (value: @[EnhancedNullability] kotlin.Double): @[EnhancedNullability] kotlin.Any [fake_override] declared in .DoubleExpression + $this: VALUE_PARAMETER name: type:.ObservableValue.ObservableValue> + VALUE_PARAMETER name:value index:0 type:@[EnhancedNullability] kotlin.Double 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 [fake_override,operator] declared in .DoubleExpression diff --git a/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt b/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt index 66efbd57b21..d1c1f6d6e57 100644 --- a/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt +++ b/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt @@ -75,12 +75,12 @@ FILE fqName: fileName:/AbstractMutableMap.kt public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.BiFunction): kotlin.Unit [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?> - FUN FAKE_OVERRIDE name:merge visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap, p0:K of .MyMap, p1:V of .MyMap, p2:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?>) returnType:V of .MyMap? [fake_override] + FUN FAKE_OVERRIDE name:merge visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap, p0:K of .MyMap, p1:@[EnhancedNullability] V of .MyMap, p2:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?>) returnType:V of .MyMap? [fake_override] overridden: - public open fun merge (p0: K of kotlin.collections.AbstractMutableMap, p1: V of kotlin.collections.AbstractMutableMap, p2: @[EnhancedNullability] java.util.function.BiFunction): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap + public open fun merge (p0: K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] V of kotlin.collections.AbstractMutableMap, p2: @[EnhancedNullability] java.util.function.BiFunction): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap VALUE_PARAMETER name:p0 index:0 type:K of .MyMap - VALUE_PARAMETER name:p1 index:1 type:V of .MyMap + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] V of .MyMap VALUE_PARAMETER name:p2 index:2 type:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?> FUN FAKE_OVERRIDE name:computeIfPresent visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap, p0:K of .MyMap, p1:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?>) returnType:V of .MyMap? [fake_override] overridden: diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index 716dbfe3a95..aca5cddbf6f 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -16861,6 +16861,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/j+k/innerNestedClassFromJava.kt"); } + @Test + @TestMetadata("integerNotNullable.kt") + public void testIntegerNotNullable() throws Exception { + runTest("compiler/testData/diagnostics/tests/j+k/integerNotNullable.kt"); + } + @Test @TestMetadata("invisiblePackagePrivateInheritedMember.kt") public void testInvisiblePackagePrivateInheritedMember() throws Exception { diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java index 35baea95f33..67d2a3bd7ce 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java @@ -16855,6 +16855,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/j+k/innerNestedClassFromJava.kt"); } + @Test + @TestMetadata("integerNotNullable.kt") + public void testIntegerNotNullable() throws Exception { + runTest("compiler/testData/diagnostics/tests/j+k/integerNotNullable.kt"); + } + @Test @TestMetadata("invisiblePackagePrivateInheritedMember.kt") public void testInvisiblePackagePrivateInheritedMember() throws Exception {