Do not consider 'expect' class type constructors final

Because even a final expected class can be actualized with an open
actual class and thus have subtypes in the platform code
This commit is contained in:
Alexander Udalov
2017-10-13 20:16:54 +02:00
parent 0a861fd4ed
commit 8a0dcca957
13 changed files with 45 additions and 17 deletions
@@ -114,7 +114,6 @@ class SyntheticClassOrObjectDescriptor(
private inner class SyntheticTypeConstructor(storageManager: StorageManager) : AbstractClassTypeConstructor(storageManager) {
override fun getParameters(): List<TypeParameterDescriptor> = emptyList()
override fun isFinal(): Boolean = true
override fun isDenotable(): Boolean = true
override fun getDeclarationDescriptor(): ClassDescriptor = thisDescriptor
override fun computeSupertypes(): Collection<KotlinType> = syntheticSupertypes
@@ -650,11 +650,6 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
return parameters.invoke();
}
@Override
public boolean isFinal() {
return getModality() == Modality.FINAL;
}
@Override
public boolean isDenotable() {
return true;