Postpone type enhancement improvements till 1.7 due to some found broken cases unmarked by warnings before
^KT-49378 Fixed
This commit is contained in:
committed by
teamcity
parent
2adc851f1b
commit
1f1b5256b0
+2
-2
@@ -2,8 +2,8 @@ package
|
|||||||
|
|
||||||
public fun main(/*0*/ aNotNullNotNullNotNull: A<kotlin.Any, kotlin.Any, kotlin.Any>, /*1*/ aNotNullNotNullNull: A<kotlin.Any, kotlin.Any, kotlin.Any?>, /*2*/ aNotNullNullNotNull: A<kotlin.Any, kotlin.Any?, kotlin.Any>, /*3*/ aNotNullNullNull: A<kotlin.Any, kotlin.Any?, kotlin.Any?>, /*4*/ b: WildcardsWithDefault): kotlin.Unit
|
public fun main(/*0*/ aNotNullNotNullNotNull: A<kotlin.Any, kotlin.Any, kotlin.Any>, /*1*/ aNotNullNotNullNull: A<kotlin.Any, kotlin.Any, kotlin.Any?>, /*2*/ aNotNullNullNotNull: A<kotlin.Any, kotlin.Any?, kotlin.Any>, /*3*/ aNotNullNullNull: A<kotlin.Any, kotlin.Any?, kotlin.Any?>, /*4*/ b: WildcardsWithDefault): kotlin.Unit
|
||||||
|
|
||||||
public open class A</*0*/ T : kotlin.Any!, /*1*/ E, /*2*/ F : @org.jspecify.nullness.NullnessUnspecified kotlin.Any!> {
|
public open class A</*0*/ T : kotlin.Any!, /*1*/ E : @org.jspecify.nullness.Nullable kotlin.Any!, /*2*/ F : @org.jspecify.nullness.NullnessUnspecified kotlin.Any!> {
|
||||||
public constructor A</*0*/ T : kotlin.Any!, /*1*/ E, /*2*/ F : @org.jspecify.nullness.NullnessUnspecified kotlin.Any!>()
|
public constructor A</*0*/ T : kotlin.Any!, /*1*/ E : @org.jspecify.nullness.Nullable kotlin.Any!, /*2*/ F : @org.jspecify.nullness.NullnessUnspecified kotlin.Any!>()
|
||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
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 hashCode(): kotlin.Int
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|||||||
+1
@@ -2,6 +2,7 @@
|
|||||||
// SOURCE_RETENTION_ANNOTATIONS
|
// SOURCE_RETENTION_ANNOTATIONS
|
||||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
|
||||||
// JSR305_GLOBAL_REPORT: strict
|
// JSR305_GLOBAL_REPORT: strict
|
||||||
|
// !LANGUAGE: +TypeEnhancementImprovementsInStrictMode
|
||||||
|
|
||||||
// FILE: spr/Nullable.java
|
// FILE: spr/Nullable.java
|
||||||
package spr;
|
package spr;
|
||||||
|
|||||||
Vendored
+2
-2
@@ -4,7 +4,7 @@ public final class A : BaseClass {
|
|||||||
public constructor A()
|
public constructor A()
|
||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
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 hashCode(): kotlin.Int
|
||||||
public open override /*1*/ /*fake_override*/ fun loadCache(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull vararg args: @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any /*kotlin.Array<(out) @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any>!*/): kotlin.Unit
|
public open override /*1*/ /*fake_override*/ fun loadCache(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull vararg args: @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any /*kotlin.Array<(out) @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any>*/): kotlin.Unit
|
||||||
public open fun loadCache(/*0*/ vararg args: kotlin.Any? /*kotlin.Array<out kotlin.Any?>*/): kotlin.Unit
|
public open fun loadCache(/*0*/ vararg args: kotlin.Any? /*kotlin.Array<out kotlin.Any?>*/): kotlin.Unit
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
}
|
}
|
||||||
@@ -21,6 +21,6 @@ public open class BaseClass {
|
|||||||
public constructor BaseClass()
|
public constructor BaseClass()
|
||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
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 hashCode(): kotlin.Int
|
||||||
public open fun loadCache(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull vararg args: @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any /*kotlin.Array<(out) @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any>!*/): kotlin.Unit
|
public open fun loadCache(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull vararg args: @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any /*kotlin.Array<(out) @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any>*/): kotlin.Unit
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -10,5 +10,5 @@ public interface MapLike<@org.jetbrains.annotations.NotNull K> {
|
|||||||
|
|
||||||
// FILE: main.kt
|
// FILE: main.kt
|
||||||
fun test2(map : MapLike<Int>, x2: Int?) {
|
fun test2(map : MapLike<Int>, x2: Int?) {
|
||||||
map.put(<!TYPE_MISMATCH!>x2<!>)
|
map.put(<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>x2<!>)
|
||||||
}
|
}
|
||||||
@@ -183,19 +183,6 @@ enum class LanguageFeature(
|
|||||||
|
|
||||||
// 1.6
|
// 1.6
|
||||||
|
|
||||||
/*
|
|
||||||
* Improvements include the following:
|
|
||||||
* - taking into account for type enhancement freshly supported type use annotations: KT-11454
|
|
||||||
* - use annotations in the type parameter position to enhance corresponding types: KT-11454
|
|
||||||
* - proper support of the type enhancement of the annotated java arrays: KT-24392
|
|
||||||
* - proper support of the type enhancement of the annotated java varargs' elements: KT-18768
|
|
||||||
* - type enhancement based on annotated bounds of type parameters
|
|
||||||
* - type enhancement within type arguments of the base classes and interfaces
|
|
||||||
* - support type enhancement based on type use annotations on java fields
|
|
||||||
* - preference of a type use annotation to annotation of another type: KT-24392
|
|
||||||
* (if @NotNull has TYPE_USE and METHOD target, then `@NotNull Integer []` -> `Array<Int>..Array<out Int>?` instead of `Array<Int>..Array<out Int>`)
|
|
||||||
*/
|
|
||||||
TypeEnhancementImprovementsInStrictMode(KOTLIN_1_6),
|
|
||||||
ProhibitJvmFieldOnOverrideFromInterfaceInPrimaryConstructor(KOTLIN_1_6, kind = BUG_FIX),
|
ProhibitJvmFieldOnOverrideFromInterfaceInPrimaryConstructor(KOTLIN_1_6, kind = BUG_FIX),
|
||||||
PrivateInFileEffectiveVisibility(KOTLIN_1_6, kind = BUG_FIX),
|
PrivateInFileEffectiveVisibility(KOTLIN_1_6, kind = BUG_FIX),
|
||||||
ProhibitSelfCallsInNestedObjects(KOTLIN_1_6, kind = BUG_FIX),
|
ProhibitSelfCallsInNestedObjects(KOTLIN_1_6, kind = BUG_FIX),
|
||||||
@@ -217,6 +204,19 @@ enum class LanguageFeature(
|
|||||||
|
|
||||||
// 1.7
|
// 1.7
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Improvements include the following:
|
||||||
|
* - taking into account for type enhancement freshly supported type use annotations: KT-11454
|
||||||
|
* - use annotations in the type parameter position to enhance corresponding types: KT-11454
|
||||||
|
* - proper support of the type enhancement of the annotated java arrays: KT-24392
|
||||||
|
* - proper support of the type enhancement of the annotated java varargs' elements: KT-18768
|
||||||
|
* - type enhancement based on annotated bounds of type parameters
|
||||||
|
* - type enhancement within type arguments of the base classes and interfaces
|
||||||
|
* - support type enhancement based on type use annotations on java fields
|
||||||
|
* - preference of a type use annotation to annotation of another type: KT-24392
|
||||||
|
* (if @NotNull has TYPE_USE and METHOD target, then `@NotNull Integer []` -> `Array<Int>..Array<out Int>?` instead of `Array<Int>..Array<out Int>`)
|
||||||
|
*/
|
||||||
|
TypeEnhancementImprovementsInStrictMode(KOTLIN_1_7),
|
||||||
ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated(KOTLIN_1_7, kind = BUG_FIX),
|
ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated(KOTLIN_1_7, kind = BUG_FIX),
|
||||||
OptInRelease(KOTLIN_1_7),
|
OptInRelease(KOTLIN_1_7),
|
||||||
ProhibitNonExhaustiveWhenOnAlgebraicTypes(KOTLIN_1_7, kind = BUG_FIX),
|
ProhibitNonExhaustiveWhenOnAlgebraicTypes(KOTLIN_1_7, kind = BUG_FIX),
|
||||||
|
|||||||
Reference in New Issue
Block a user