Dont show warning for KT-21515 with LV>=1.3

This commit is contained in:
Dmitry Savvinov
2020-09-15 14:01:17 +03:00
parent 57ceb0fa20
commit 6a55475392
9 changed files with 41 additions and 32 deletions
@@ -652,6 +652,12 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
}
}
@Override
protected boolean getShouldReportCyclicScopeWithCompanionWarning() {
return !c.getLanguageVersionSettings()
.supportsFeature(LanguageFeature.ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion);
}
@Override
protected void reportScopesLoopError(@NotNull KotlinType type) {
PsiElement reportOn = DescriptorToSourceUtils.getSourceFromDescriptor(type.getConstructor().getDeclarationDescriptor());