Don't add Enum.entries to scope if it can't be called

^KT-53929 Fixed
This commit is contained in:
Roman Efremov
2023-01-03 14:44:35 +01:00
parent 2dc3871954
commit 878608b7b2
14 changed files with 88 additions and 19 deletions
@@ -135,7 +135,7 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
this.kind = classLikeInfo.getClassKind();
this.staticScope = kind == ClassKind.ENUM_CLASS ?
new StaticScopeForKotlinEnum(
storageManager, this
storageManager, this, /* enumEntriesCanBeUsed = */ true
) : MemberScope.Empty.INSTANCE;
this.typeConstructor = new LazyClassTypeConstructor();