Check type parameter bounds by java nullability annotations not only in basic resolution context

^KT-47920 Fixed
This commit is contained in:
Victor Petukhov
2021-07-27 13:24:54 +03:00
committed by teamcityserver
parent 20d50cfee7
commit c5d783596d
7 changed files with 37 additions and 5 deletions
@@ -14,7 +14,7 @@ public class ClassTypeParameterBoundWithWarnings <T extends @NotNull String> {
// FILE: main.kt
fun main(x: ClassTypeParameterBoundWithWarnings<<!UPPER_BOUND_VIOLATED_BASED_ON_JAVA_ANNOTATIONS!>String?<!>>, y: ClassTypeParameterBoundWithWarnings<String>, a: String?, b: String) {
val x2 = ClassTypeParameterBoundWithWarnings<String?>()
val x2 = ClassTypeParameterBoundWithWarnings<<!UPPER_BOUND_VIOLATED_BASED_ON_JAVA_ANNOTATIONS!>String?<!>>()
val y2 = ClassTypeParameterBoundWithWarnings<String>()
val x3 = ClassTypeParameterBoundWithWarnings(<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a<!>)
@@ -14,7 +14,7 @@ public class ClassTypeParameterBoundWithWarnings <T extends @NotNull String> {
// FILE: main.kt
fun main(x: ClassTypeParameterBoundWithWarnings<<!UPPER_BOUND_VIOLATED_BASED_ON_JAVA_ANNOTATIONS!>String?<!>>, y: ClassTypeParameterBoundWithWarnings<String>, a: String?, b: String) {
val x2 = ClassTypeParameterBoundWithWarnings<String?>()
val x2 = ClassTypeParameterBoundWithWarnings<<!UPPER_BOUND_VIOLATED_BASED_ON_JAVA_ANNOTATIONS!>String?<!>>()
val y2 = ClassTypeParameterBoundWithWarnings<String>()
val x3 = ClassTypeParameterBoundWithWarnings(<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a<!>)