AA: honor wildcard suppression on type during type conversion

^KT-61734
This commit is contained in:
Jinseong Jeon
2024-02-22 14:50:09 -08:00
committed by teamcity
parent 94e5653eb7
commit d089db5a45
3 changed files with 17 additions and 3 deletions
@@ -73,6 +73,13 @@ internal class KtFe10PsiTypeProvider(
typeMapper.typeContext.getOptimalModeForReturnType(type.fe10Type, isAnnotationMethod)
KtTypeMappingMode.VALUE_PARAMETER ->
typeMapper.typeContext.getOptimalModeForValueParameter(type.fe10Type)
}.let { typeMappingMode ->
// Otherwise, i.e., if we won't skip type with no type arguments, flag overriding might bother a case like:
// @JvmSuppressWildcards(false) Long -> java.lang.Long, not long, even though it should be no-op!
if (type.fe10Type.arguments.isEmpty())
typeMappingMode
else
typeMappingMode.updateArgumentModeFromAnnotations(type.fe10Type, typeMapper.typeContext)
}
}