From 99491014e4d73e25600e6c7da8611f719903c399 Mon Sep 17 00:00:00 2001 From: Victor Petukhov Date: Mon, 19 Jul 2021 14:24:17 +0300 Subject: [PATCH] Prefer flexible nullability by Java annotations to nullable one if the corresponding type parameter has nullable bound ^KT-47422 Fixed --- .../TypeArgumentsFromParameterBounds.fir.kt | 6 +- .../TypeArgumentsFromParameterBounds.fir.txt | 2 +- .../TypeArgumentsFromParameterBounds.kt | 6 +- .../TypeArgumentsFromParameterBounds.txt | 2 +- .../java8Tests/jspecify/strictMode/kt47422.kt | 136 ++++++++++++++++++ .../jspecify/strictMode/kt47422.txt | 86 +++++++++++ .../java8Tests/jspecify/strictMode/kt47437.kt | 17 +++ .../jspecify/strictMode/kt47437.txt | 13 ++ .../TypeArgumentsFromParameterBounds.fir.kt | 6 +- .../TypeArgumentsFromParameterBounds.kt | 6 +- ...nAnnotationsCompiledJavaTestGenerated.java | 12 ++ ...dJavaWithPsiClassReadingTestGenerated.java | 12 ++ ...ignAnnotationsSourceJavaTestGenerated.java | 12 ++ .../typeEnhancement/signatureEnhancement.kt | 8 ++ 14 files changed, 306 insertions(+), 18 deletions(-) create mode 100644 compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47422.kt create mode 100644 compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47422.txt create mode 100644 compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47437.kt create mode 100644 compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47437.txt diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.fir.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.fir.kt index 8718e250b35..2d7a26dc912 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.fir.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.fir.kt @@ -42,10 +42,8 @@ fun main( // jspecify_nullness_mismatch a.bar(aNotNullNullNull) - // jspecify_nullness_mismatch - b.bar(aNotNullNotNullNotNull) - // jspecify_nullness_mismatch - b.bar(aNotNullNotNullNull) + b.bar(aNotNullNotNullNotNull) + b.bar(aNotNullNotNullNull) b.bar(aNotNullNullNotNull) b.bar(aNotNullNullNull) } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.fir.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.fir.txt index bae935aa22e..5c8e882c797 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.fir.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.fir.txt @@ -12,7 +12,7 @@ public fun main(/*0*/ aNotNullNotNullNotNull: TypeArgumentsFromParameterBounds!): kotlin.Unit + public open fun bar(/*0*/ a: TypeArgumentsFromParameterBounds!): kotlin.Unit 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 override /*1*/ /*fake_override*/ fun toString(): kotlin.String diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.kt index 0ec664627e6..6015fc5136d 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.kt @@ -42,10 +42,8 @@ fun main( // jspecify_nullness_mismatch a.bar(aNotNullNullNull) - // jspecify_nullness_mismatch - b.bar(aNotNullNotNullNotNull) - // jspecify_nullness_mismatch - b.bar(aNotNullNotNullNull) + b.bar(aNotNullNotNullNotNull) + b.bar(aNotNullNotNullNull) b.bar(aNotNullNullNotNull) b.bar(aNotNullNullNull) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.txt index caedf24968c..39147e078ca 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeArgumentsFromParameterBounds.txt @@ -12,7 +12,7 @@ public fun main(/*0*/ aNotNullNotNullNotNull: TypeArgumentsFromParameterBounds!): kotlin.Unit + public open fun bar(/*0*/ a: TypeArgumentsFromParameterBounds!): kotlin.Unit 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 override /*1*/ /*fake_override*/ fun toString(): kotlin.String diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47422.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47422.kt new file mode 100644 index 00000000000..26a1aeb8395 --- /dev/null +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47422.kt @@ -0,0 +1,136 @@ +// JSPECIFY_STATE: strict +// !DIAGNOSTICS: -UNUSED_PARAMETER +// !LANGUAGE: +TypeEnhancementImprovementsInStrictMode + +// FILE: Foo.java +import org.jspecify.nullness.*; + +public interface Foo {} + +// FILE: Util.java +public class Util { + public static Foo getFooOfString() { + throw new RuntimeException(); + } +} + +// FILE: UtilNullMarked.java +import org.jspecify.nullness.*; + +@NullMarked +public class UtilNullMarked { + public static Foo getFooOfString() { + throw new RuntimeException(); + } +} + +// FILE: UtilNullMarkedGeneric.java +import org.jspecify.nullness.*; + +@NullMarked +public class UtilNullMarkedGeneric { + public static Foo getFooOfK() { + throw new RuntimeException(); + } +} + +// FILE: UtilNullMarkedGenericNullableBound.java +import org.jspecify.nullness.*; + +@NullMarked +public class UtilNullMarkedGenericNullableBound { + public static Foo getFooOfK() { + throw new RuntimeException(); + } +} + +// FILE: UtilGenericNullableBound.java +import org.jspecify.nullness.*; + +public class UtilGenericNullableBound { + public static Foo getFooOfK() { + throw new RuntimeException(); + } +} + +// FILE: UtilNullMarkedGenericNullnessUnspecifiedBound.java +import org.jspecify.nullness.*; + +@NullMarked +public class UtilNullMarkedGenericNullnessUnspecifiedBound { + public static Foo getFooOfK() { + throw new RuntimeException(); + } +} + +// FILE: UtilGenericNullnessUnspecifiedBound.java +import org.jspecify.nullness.*; + +public class UtilGenericNullnessUnspecifiedBound { + public static Foo getFooOfK() { + throw new RuntimeException(); + } +} + +// FILE: main.kt + +// no errors on this call means String in Foo is flexible +fun isNotNullAndNullableStringInFoo(x: Foo, y: Foo) {} + +fun test1() { + // String in Foo is flexible + isNotNullAndNullableStringInFoo( + Util.getFooOfString(), + Util.getFooOfString() + ) +} + +fun test2() { + // String in Foo is not null + isNotNullAndNullableStringInFoo( + UtilNullMarked.getFooOfString(), + // jspecify_nullness_mismatch + UtilNullMarked.getFooOfString() + ) +} + +fun test3() { + // String in Foo is not null + isNotNullAndNullableStringInFoo( + UtilNullMarkedGeneric.getFooOfK(), + // jspecify_nullness_mismatch + UtilNullMarkedGeneric.getFooOfK() + ) +} + +fun test4() { + // String in Foo is flexible + isNotNullAndNullableStringInFoo( + UtilNullMarkedGenericNullableBound.getFooOfK(), + UtilNullMarkedGenericNullableBound.getFooOfK() + ) +} + +fun test5() { + // String in Foo is flexible + isNotNullAndNullableStringInFoo( + UtilGenericNullableBound.getFooOfK(), + UtilGenericNullableBound.getFooOfK() + ) +} + +fun test6() { + // String in Foo is flexible + isNotNullAndNullableStringInFoo( + UtilNullMarkedGenericNullnessUnspecifiedBound.getFooOfK(), + UtilNullMarkedGenericNullnessUnspecifiedBound.getFooOfK() + ) +} + +fun test7() { + // String in Foo is flexible + isNotNullAndNullableStringInFoo( + UtilGenericNullnessUnspecifiedBound.getFooOfK(), + UtilGenericNullnessUnspecifiedBound.getFooOfK() + ) +} diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47422.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47422.txt new file mode 100644 index 00000000000..a0dc8368cef --- /dev/null +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47422.txt @@ -0,0 +1,86 @@ +package + +public fun isNotNullAndNullableStringInFoo(/*0*/ x: Foo, /*1*/ y: Foo): kotlin.Unit +public fun test1(): kotlin.Unit +public fun test2(): kotlin.Unit +public fun test3(): kotlin.Unit +public fun test4(): kotlin.Unit +public fun test5(): kotlin.Unit +public fun test6(): kotlin.Unit +public fun test7(): kotlin.Unit + +public interface Foo { + 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 override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public open class Util { + public constructor Util() + 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 override /*1*/ /*fake_override*/ fun toString(): kotlin.String + + // Static members + public open fun getFooOfString(): Foo! +} + +public open class UtilGenericNullableBound { + public constructor UtilGenericNullableBound() + 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 override /*1*/ /*fake_override*/ fun toString(): kotlin.String + + // Static members + public open fun getFooOfK(): Foo! +} + +public open class UtilGenericNullnessUnspecifiedBound { + public constructor UtilGenericNullnessUnspecifiedBound() + 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 override /*1*/ /*fake_override*/ fun toString(): kotlin.String + + // Static members + public open fun getFooOfK(): Foo! +} + +@org.jspecify.nullness.NullMarked public open class UtilNullMarked { + public constructor UtilNullMarked() + 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 override /*1*/ /*fake_override*/ fun toString(): kotlin.String + + // Static members + public open fun getFooOfString(): Foo +} + +@org.jspecify.nullness.NullMarked public open class UtilNullMarkedGeneric { + public constructor UtilNullMarkedGeneric() + 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 override /*1*/ /*fake_override*/ fun toString(): kotlin.String + + // Static members + public open fun getFooOfK(): Foo +} + +@org.jspecify.nullness.NullMarked public open class UtilNullMarkedGenericNullableBound { + public constructor UtilNullMarkedGenericNullableBound() + 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 override /*1*/ /*fake_override*/ fun toString(): kotlin.String + + // Static members + public open fun getFooOfK(): Foo +} + +@org.jspecify.nullness.NullMarked public open class UtilNullMarkedGenericNullnessUnspecifiedBound { + public constructor UtilNullMarkedGenericNullnessUnspecifiedBound() + 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 override /*1*/ /*fake_override*/ fun toString(): kotlin.String + + // Static members + public open fun getFooOfK(): Foo +} diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47437.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47437.kt new file mode 100644 index 00000000000..3e2dca9d0ff --- /dev/null +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47437.kt @@ -0,0 +1,17 @@ +// JSPECIFY_STATE: strict +// !LANGUAGE: +TypeEnhancementImprovementsInStrictMode + +// FILE: Foo.java +import org.jspecify.nullness.*; + +@NullMarked +public class Foo { + static Foo create() { + return new Foo<>(); + } +} + +// FILE: main.kt +fun test(): Foo { + return ")!>Foo.create() +} diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47437.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47437.txt new file mode 100644 index 00000000000..8639509c4a1 --- /dev/null +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47437.txt @@ -0,0 +1,13 @@ +package + +public fun test(): Foo + +@org.jspecify.nullness.NullMarked public open class Foo { + public constructor Foo() + 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 override /*1*/ /*fake_override*/ fun toString(): kotlin.String + + // Static members + public/*package*/ open fun ..kotlin.Comparable?)> create(): Foo +} diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/TypeArgumentsFromParameterBounds.fir.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/TypeArgumentsFromParameterBounds.fir.kt index 638c05bbae4..662f411c049 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/TypeArgumentsFromParameterBounds.fir.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/TypeArgumentsFromParameterBounds.fir.kt @@ -41,10 +41,8 @@ fun main( // jspecify_nullness_mismatch a.bar(aNotNullNullNull) - // jspecify_nullness_mismatch - b.bar(aNotNullNotNullNotNull) - // jspecify_nullness_mismatch - b.bar(aNotNullNotNullNull) + b.bar(aNotNullNotNullNotNull) + b.bar(aNotNullNotNullNull) b.bar(aNotNullNullNotNull) b.bar(aNotNullNullNull) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/TypeArgumentsFromParameterBounds.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/TypeArgumentsFromParameterBounds.kt index 638c05bbae4..662f411c049 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/TypeArgumentsFromParameterBounds.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/TypeArgumentsFromParameterBounds.kt @@ -41,10 +41,8 @@ fun main( // jspecify_nullness_mismatch a.bar(aNotNullNullNull) - // jspecify_nullness_mismatch - b.bar(aNotNullNotNullNotNull) - // jspecify_nullness_mismatch - b.bar(aNotNullNotNullNull) + b.bar(aNotNullNotNullNotNull) + b.bar(aNotNullNotNullNull) b.bar(aNotNullNullNotNull) b.bar(aNotNullNullNull) } \ No newline at end of file diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsCompiledJavaTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsCompiledJavaTestGenerated.java index 80f0b209f99..95aac6c2068 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsCompiledJavaTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsCompiledJavaTestGenerated.java @@ -654,6 +654,18 @@ public class ForeignAnnotationsCompiledJavaTestGenerated extends AbstractForeign runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/IgnoreAnnotations.fir.kt"); } + @Test + @TestMetadata("kt47422.kt") + public void testKt47422() throws Exception { + runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47422.kt"); + } + + @Test + @TestMetadata("kt47437.kt") + public void testKt47437() throws Exception { + runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47437.kt"); + } + @Test @TestMetadata("NonPlatformTypeParameter.kt") public void testNonPlatformTypeParameter() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsCompiledJavaWithPsiClassReadingTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsCompiledJavaWithPsiClassReadingTestGenerated.java index 5bc75d04d70..61bf79e9ab4 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsCompiledJavaWithPsiClassReadingTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsCompiledJavaWithPsiClassReadingTestGenerated.java @@ -654,6 +654,18 @@ public class ForeignAnnotationsCompiledJavaWithPsiClassReadingTestGenerated exte runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/IgnoreAnnotations.fir.kt"); } + @Test + @TestMetadata("kt47422.kt") + public void testKt47422() throws Exception { + runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47422.kt"); + } + + @Test + @TestMetadata("kt47437.kt") + public void testKt47437() throws Exception { + runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47437.kt"); + } + @Test @TestMetadata("NonPlatformTypeParameter.kt") public void testNonPlatformTypeParameter() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsSourceJavaTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsSourceJavaTestGenerated.java index f23ffd306b2..b05f38ed5a8 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsSourceJavaTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsSourceJavaTestGenerated.java @@ -654,6 +654,18 @@ public class ForeignAnnotationsSourceJavaTestGenerated extends AbstractForeignAn runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/IgnoreAnnotations.fir.kt"); } + @Test + @TestMetadata("kt47422.kt") + public void testKt47422() throws Exception { + runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47422.kt"); + } + + @Test + @TestMetadata("kt47437.kt") + public void testKt47437() throws Exception { + runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/kt47437.kt"); + } + @Test @TestMetadata("NonPlatformTypeParameter.kt") public void testNonPlatformTypeParameter() throws Exception { diff --git a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/typeEnhancement/signatureEnhancement.kt b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/typeEnhancement/signatureEnhancement.kt index b304019027d..9c33645dc50 100644 --- a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/typeEnhancement/signatureEnhancement.kt +++ b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/typeEnhancement/signatureEnhancement.kt @@ -398,6 +398,14 @@ class SignatureEnhancement( } val boundsFromTypeParameterForArgument = typeParameterForArgument?.boundsNullability() ?: return result + + if (defaultTypeQualifier == null && result == null && boundsFromTypeParameterForArgument.qualifier == NullabilityQualifier.NULLABLE) { + return NullabilityQualifierWithMigrationStatus( + NullabilityQualifier.FORCE_FLEXIBILITY, + boundsFromTypeParameterForArgument.isForWarningOnly + ) + } + if (result == null) return boundsFromTypeParameterForArgument return mostSpecific(boundsFromTypeParameterForArgument, result)