[FIR] Support flexible and DNN types in upper bound violated extra message

#KT-66379 Fixed
This commit is contained in:
Kirill Rakhman
2024-03-07 11:32:04 +01:00
committed by Space Team
parent 926ae2abb8
commit 09a19d7dbe
4 changed files with 48 additions and 6 deletions
@@ -209,7 +209,7 @@ fun checkUpperBoundViolated(
argumentSource, FirErrors.UPPER_BOUND_VIOLATED_IN_TYPEALIAS_EXPANSION, upperBound, argumentType.type, context
)
} else {
val extraMessage = if(upperBound is ConeCapturedType) "Consider removing the explicit type arguments" else ""
val extraMessage = if (upperBound.lowerBoundIfFlexible().originalIfDefinitelyNotNullable() is ConeCapturedType) "Consider removing the explicit type arguments" else ""
reporter.reportOn(
argumentSource, FirErrors.UPPER_BOUND_VIOLATED,
upperBound, argumentType.type, extraMessage, context