K1: drop redundant OptIn check for expanded type
This commit is contained in:
committed by
teamcity
parent
3f96626b40
commit
84291181af
@@ -417,15 +417,7 @@ class OptInUsageChecker(project: Project) : CallChecker {
|
||||
}
|
||||
|
||||
if (element.getParentOfType<KtImportDirective>(false) == null) {
|
||||
val descriptions = mutableSetOf<OptInDescription>()
|
||||
descriptions += targetDescriptor.loadOptIns(moduleAnnotationsResolver, context.languageVersionSettings)
|
||||
if (targetDescriptor is TypeAliasDescriptor) {
|
||||
descriptions.addAll(
|
||||
targetDescriptor.expandedType.loadOptIns(
|
||||
moduleAnnotationsResolver, context.languageVersionSettings, mutableSetOf(targetDescriptor)
|
||||
)
|
||||
)
|
||||
}
|
||||
val descriptions = targetDescriptor.loadOptIns(moduleAnnotationsResolver, context.languageVersionSettings)
|
||||
reportNotAllowedOptIns(descriptions, element, context)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user