diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/NewTypeSubstitutor.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/NewTypeSubstitutor.kt index 3aca69a1cb5..12d91812b4c 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/NewTypeSubstitutor.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/NewTypeSubstitutor.kt @@ -54,8 +54,9 @@ interface NewTypeSubstitutor : TypeSubstitutorMarker { } else { val lowerBound = substitute(type.lowerBound, keepAnnotation, runCapturedChecks) val upperBound = substitute(type.upperBound, keepAnnotation, runCapturedChecks) - val enhancement = - if (type is TypeWithEnhancement) substituteTypeEnhancement(type, keepAnnotation, runCapturedChecks) else null + val enhancement = if (type is TypeWithEnhancement) { + substituteTypeEnhancement(type.enhancement, keepAnnotation, runCapturedChecks) + } else null if (lowerBound == null && upperBound == null) { null diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/NonPlatformTypeParameter.fir.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/NonPlatformTypeParameter.fir.kt index 1f5df653fd9..c9a06d657be 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/NonPlatformTypeParameter.fir.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/NonPlatformTypeParameter.fir.kt @@ -18,8 +18,8 @@ fun main(a1: NonPlatformTypeParameter, a2: NonPlatformTypeParam a1.bar(null) a1.bar(x) - // jspecify_nullness_mismatch{mute} - a2.foo(null) + // jspecify_nullness_mismatch + a2.foo(null) a2.bar(null) // jspecify_nullness_mismatch a2.bar(null) diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/NonPlatformTypeParameter.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/NonPlatformTypeParameter.kt index 1f5df653fd9..c9a06d657be 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/NonPlatformTypeParameter.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/NonPlatformTypeParameter.kt @@ -18,8 +18,8 @@ fun main(a1: NonPlatformTypeParameter, a2: NonPlatformTypeParam a1.bar(null) a1.bar(x) - // jspecify_nullness_mismatch{mute} - a2.foo(null) + // jspecify_nullness_mismatch + a2.foo(null) a2.bar(null) // jspecify_nullness_mismatch a2.bar(null)