diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/MutableClassDescriptorLite.java b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/MutableClassDescriptorLite.java index de433513b11..c7e45fd090e 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/MutableClassDescriptorLite.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/MutableClassDescriptorLite.java @@ -282,6 +282,9 @@ public class MutableClassDescriptorLite extends MutableDeclarationDescriptor imp public void addSupertype(@NotNull JetType supertype) { if (!ErrorUtils.isErrorType(supertype)) { + if (!(supertype.getConstructor().getDeclarationDescriptor() instanceof ClassDescriptor)) { + throw new IllegalStateException(); + } supertypes.add(supertype); } }