[FE] Collect inheritors of sealed classes from new places in computeSealedSubclasses

#KT-13495
This commit is contained in:
Dmitriy Novozhilov
2020-11-16 12:20:15 +03:00
committed by TeamCityServer
parent 70c61be1ef
commit e76acc8ee0
17 changed files with 374 additions and 39 deletions
@@ -271,7 +271,8 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
);
// TODO: only consider classes from the same file, not the whole package fragment
this.sealedSubclasses = storageManager.createLazyValue(() -> DescriptorUtilsKt.computeSealedSubclasses(this));
boolean freedomForSealedInterfacesSupported = c.getLanguageVersionSettings().supportsFeature(LanguageFeature.FreedomForSealedClasses);
this.sealedSubclasses = storageManager.createLazyValue(() -> DescriptorUtilsKt.computeSealedSubclasses(this, freedomForSealedInterfacesSupported));
}
private static boolean isIllegalInner(@NotNull DeclarationDescriptor descriptor) {