[FE 1.0] Force resolve annotations on type arguments

^KT-46173
This commit is contained in:
Dmitriy Novozhilov
2021-07-22 13:48:50 +03:00
committed by Mikhael Bogdanov
parent e316cd04b6
commit b1d17cfd7b
3 changed files with 12 additions and 3 deletions
@@ -158,6 +158,15 @@ class AnnotationChecker(
val shouldRunCheck = isSuperType || shouldCheckReferenceItself
if (shouldRunCheck) {
for (entry in reference.annotationEntries) {
val descriptor = trace.get(BindingContext.ANNOTATION, entry)
if (descriptor is LazyAnnotationDescriptor) {
/*
* There are no users of type annotations until backend, so if there are errors
* in annotation call then we should force resolve of it to detect and
* report them
*/
descriptor.forceResolveAllContents()
}
val actualTargets = getActualTargetList(reference, null, trace.bindingContext)
if (entry.useSiteTarget != null && isSuperType) {
val reportError = languageVersionSettings.supportsFeature(ProhibitUseSiteTargetAnnotationsOnSuperTypes)