Check if the class is special by FQ name
This is needed because our built-ins can be loaded with two different mechanisms (deserialization and lazy resolve) and, when that happens, corresponding descriptors aren't equal to each other, so one of two resolved descriptors for Any (or the same with Nothing) was never considered to be a "special class" with no supertypes
This commit is contained in:
@@ -235,8 +235,7 @@ public class DescriptorValidator {
|
||||
|
||||
Collection<JetType> supertypes = descriptor.getTypeConstructor().getSupertypes();
|
||||
if (supertypes.isEmpty() && descriptor.getKind() != ClassKind.TRAIT
|
||||
&& KotlinBuiltIns.getInstance().getAny() != descriptor
|
||||
&& KotlinBuiltIns.getInstance().getNothing() != descriptor) {
|
||||
&& !KotlinBuiltIns.isSpecialClassWithNoSupertypes(descriptor)) {
|
||||
report(collector, descriptor, "No supertypes for non-trait");
|
||||
}
|
||||
validateTypes(descriptor, collector, supertypes);
|
||||
|
||||
Reference in New Issue
Block a user