Files
Andrey Cherkasov 1e90f85566 [kotlin] Port AddGenericUpperBoundFix to K2
This quick is for the UPPER_BOUND_VIOLATED and UPPER_BOUND_VIOLATED_BASED_ON_JAVA_ANNOTATIONS compiler errors.

^KTIJ-29567

GitOrigin-RevId: b1741545da363c64cc3df770f5ce5443221536d9
2024-09-21 02:56:36 +00:00

10 lines
356 B
Kotlin

// "Add 'Any' as upper bound for E to make it non-nullable" "true"
// ERROR: Type mismatch: inferred type is F but Any was expected
fun <T : Any, U: Any> foo(x: T, y: U) = 1
fun <E, F> bar(x: E, y: F) = foo(<caret>x, y)
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.HighPriorityMakeUpperBoundNonNullableFix
// TODO: KTIJ-29580
/* IGNORE_K2 */