Minor, refine return type of AbstractClassTypeConstructor.getDeclarationDescriptor
This commit is contained in:
+1
-1
@@ -116,7 +116,7 @@ class SyntheticClassOrObjectDescriptor(
|
|||||||
override fun getParameters(): List<TypeParameterDescriptor> = emptyList()
|
override fun getParameters(): List<TypeParameterDescriptor> = emptyList()
|
||||||
override fun isFinal(): Boolean = true
|
override fun isFinal(): Boolean = true
|
||||||
override fun isDenotable(): Boolean = true
|
override fun isDenotable(): Boolean = true
|
||||||
override fun getDeclarationDescriptor(): ClassifierDescriptor = thisDescriptor
|
override fun getDeclarationDescriptor(): ClassDescriptor = thisDescriptor
|
||||||
override fun computeSupertypes(): Collection<KotlinType> = syntheticSupertypes
|
override fun computeSupertypes(): Collection<KotlinType> = syntheticSupertypes
|
||||||
override val supertypeLoopChecker: SupertypeLoopChecker = SupertypeLoopChecker.EMPTY
|
override val supertypeLoopChecker: SupertypeLoopChecker = SupertypeLoopChecker.EMPTY
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -662,7 +662,7 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public ClassifierDescriptor getDeclarationDescriptor() {
|
public ClassDescriptor getDeclarationDescriptor() {
|
||||||
return LazyClassDescriptor.this;
|
return LazyClassDescriptor.this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -257,9 +257,9 @@ class LazyJavaClassDescriptor(
|
|||||||
|
|
||||||
override fun isFinal(): Boolean = isFinalClass
|
override fun isFinal(): Boolean = isFinalClass
|
||||||
|
|
||||||
override fun isDenotable() = true
|
override fun isDenotable(): Boolean = true
|
||||||
|
|
||||||
override fun getDeclarationDescriptor() = this@LazyJavaClassDescriptor
|
override fun getDeclarationDescriptor(): ClassDescriptor = this@LazyJavaClassDescriptor
|
||||||
|
|
||||||
override fun toString(): String = name.asString()
|
override fun toString(): String = name.asString()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public abstract class AbstractClassTypeConstructor extends AbstractTypeConstruct
|
|||||||
if (currentHashCode != 0) return currentHashCode;
|
if (currentHashCode != 0) return currentHashCode;
|
||||||
|
|
||||||
ClassifierDescriptor descriptor = getDeclarationDescriptor();
|
ClassifierDescriptor descriptor = getDeclarationDescriptor();
|
||||||
if (descriptor instanceof ClassDescriptor && hasMeaningfulFqName(descriptor)) {
|
if (hasMeaningfulFqName(descriptor)) {
|
||||||
currentHashCode = DescriptorUtils.getFqName(descriptor).hashCode();
|
currentHashCode = DescriptorUtils.getFqName(descriptor).hashCode();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -51,7 +51,7 @@ public abstract class AbstractClassTypeConstructor extends AbstractTypeConstruct
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public abstract ClassifierDescriptor getDeclarationDescriptor();
|
public abstract ClassDescriptor getDeclarationDescriptor();
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
@@ -81,7 +81,7 @@ public abstract class AbstractClassTypeConstructor extends AbstractTypeConstruct
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (myDescriptor instanceof ClassDescriptor && otherDescriptor instanceof ClassDescriptor) {
|
if (otherDescriptor instanceof ClassDescriptor) {
|
||||||
return areFqNamesEqual(((ClassDescriptor) myDescriptor), ((ClassDescriptor) otherDescriptor));
|
return areFqNamesEqual(((ClassDescriptor) myDescriptor), ((ClassDescriptor) otherDescriptor));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user