kill ClassDescriptor.superclassType
it is not used anywhere, I'll restore it when it is needed
This commit is contained in:
-11
@@ -22,7 +22,6 @@ public class JavaClassDescriptor extends MutableDeclarationDescriptor implements
|
||||
private final Set<ConstructorDescriptor> constructors = Sets.newLinkedHashSet();
|
||||
private Modality modality;
|
||||
private Visibility visibility;
|
||||
private JetType superclassType;
|
||||
private final ClassKind kind;
|
||||
private ClassReceiver implicitReceiver;
|
||||
|
||||
@@ -83,16 +82,6 @@ public class JavaClassDescriptor extends MutableDeclarationDescriptor implements
|
||||
return new SubstitutingScope(unsubstitutedMemberScope, substitutor);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public JetType getSuperclassType() {
|
||||
return superclassType;
|
||||
}
|
||||
|
||||
public void setSuperclassType(@NotNull JetType superclassType) {
|
||||
this.superclassType = superclassType;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Set<ConstructorDescriptor> getConstructors() {
|
||||
|
||||
+2
-2
@@ -269,7 +269,7 @@ public class JavaDescriptorResolver {
|
||||
|
||||
supertypes.addAll(getSupertypes(psiClass));
|
||||
if (psiClass.isInterface()) {
|
||||
classData.classDescriptor.setSuperclassType(JetStandardClasses.getAnyType()); // TODO : Make it java.lang.Object
|
||||
//classData.classDescriptor.setSuperclassType(JetStandardClasses.getAnyType()); // TODO : Make it java.lang.Object
|
||||
}
|
||||
else {
|
||||
PsiClassType[] extendsListTypes = psiClass.getExtendsListTypes();
|
||||
@@ -277,7 +277,7 @@ public class JavaDescriptorResolver {
|
||||
JetType superclassType = extendsListTypes.length == 0
|
||||
? JetStandardClasses.getAnyType()
|
||||
: semanticServices.getTypeTransformer().transformToType(extendsListTypes[0]);
|
||||
classData.classDescriptor.setSuperclassType(superclassType);
|
||||
//classData.classDescriptor.setSuperclassType(superclassType);
|
||||
}
|
||||
|
||||
PsiMethod[] psiConstructors = psiClass.getConstructors();
|
||||
|
||||
@@ -20,12 +20,6 @@ public interface ClassDescriptor extends ClassifierDescriptor, MemberDescriptor
|
||||
@NotNull
|
||||
JetScope getMemberScope(List<TypeProjection> typeArguments);
|
||||
|
||||
/**
|
||||
* @return the superclass for a class descriptor, and the required class fro a trait descriptor
|
||||
*/
|
||||
@NotNull
|
||||
JetType getSuperclassType();
|
||||
|
||||
@NotNull
|
||||
Set<ConstructorDescriptor> getConstructors();
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ public class ClassDescriptorImpl extends DeclarationDescriptorImpl implements Cl
|
||||
private JetScope memberDeclarations;
|
||||
private Set<ConstructorDescriptor> constructors;
|
||||
private ConstructorDescriptor primaryConstructor;
|
||||
private JetType superclassType;
|
||||
private ReceiverDescriptor implicitReceiver;
|
||||
|
||||
public ClassDescriptorImpl(
|
||||
@@ -50,7 +49,6 @@ public class ClassDescriptorImpl extends DeclarationDescriptorImpl implements Cl
|
||||
this.memberDeclarations = memberDeclarations;
|
||||
this.constructors = constructors;
|
||||
this.primaryConstructor = primaryConstructor;
|
||||
this.superclassType = superclassType;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -86,12 +84,6 @@ public class ClassDescriptorImpl extends DeclarationDescriptorImpl implements Cl
|
||||
return new SubstitutingScope(memberDeclarations, TypeSubstitutor.create(substitutionContext));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public JetType getSuperclassType() {
|
||||
return superclassType;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public JetType getDefaultType() {
|
||||
|
||||
-9
@@ -81,15 +81,6 @@ public class LazySubstitutingClassDescriptor implements ClassDescriptor {
|
||||
return new SubstitutingScope(memberScope, getSubstitutor());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public JetType getSuperclassType() {
|
||||
if (superclassType == null) {
|
||||
superclassType = getSubstitutor().substitute(original.getSuperclassType(), Variance.INVARIANT);
|
||||
}
|
||||
return superclassType;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public JetType getDefaultType() {
|
||||
|
||||
@@ -347,17 +347,6 @@ public class MutableClassDescriptor extends MutableDeclarationDescriptor impleme
|
||||
return kind;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public JetType getSuperclassType() {
|
||||
return superclassType;
|
||||
}
|
||||
|
||||
public void setSuperclassType(@NotNull JetType superclassType) {
|
||||
this.superclassType = superclassType;
|
||||
}
|
||||
|
||||
|
||||
public void setModality(Modality modality) {
|
||||
this.modality = modality;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user