rename: isSealed -> isFinal
This commit is contained in:
+1
-1
@@ -348,7 +348,7 @@ public class DeserializedClassDescriptor extends AbstractClassDescriptor impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSealed() {
|
||||
public boolean isFinal() {
|
||||
return !getModality().isOverridable();
|
||||
}
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ public class BodyResolver {
|
||||
trace.report(SUPERTYPE_APPEARS_TWICE.on(typeReference));
|
||||
}
|
||||
|
||||
if (constructor.isSealed() && !allowedFinalSupertypes.contains(constructor)) {
|
||||
if (constructor.isFinal() && !allowedFinalSupertypes.contains(constructor)) {
|
||||
trace.report(FINAL_SUPERTYPE.on(typeReference));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -461,7 +461,7 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements LazyDesc
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSealed() {
|
||||
public boolean isFinal() {
|
||||
return !getModality().isOverridable();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -163,7 +163,7 @@ public abstract class AbstractLazyTypeParameterDescriptor implements TypeParamet
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSealed() {
|
||||
public boolean isFinal() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -65,7 +65,7 @@ public class ClassDescriptorImpl extends DeclarationDescriptorNonRootImpl implem
|
||||
|
||||
|
||||
public final ClassDescriptorImpl initialize(
|
||||
boolean sealed,
|
||||
boolean isFinal,
|
||||
@NotNull List<? extends TypeParameterDescriptor> typeParameters,
|
||||
@NotNull Collection<JetType> supertypes,
|
||||
@NotNull JetScope memberDeclarations,
|
||||
@@ -73,7 +73,7 @@ public class ClassDescriptorImpl extends DeclarationDescriptorNonRootImpl implem
|
||||
@Nullable ConstructorDescriptor primaryConstructor,
|
||||
boolean isInner
|
||||
) {
|
||||
this.typeConstructor = new TypeConstructorImpl(this, getAnnotations(), sealed, getName().asString(), typeParameters, supertypes);
|
||||
this.typeConstructor = new TypeConstructorImpl(this, getAnnotations(), isFinal, getName().asString(), typeParameters, supertypes);
|
||||
this.memberDeclarations = memberDeclarations;
|
||||
this.constructors = constructors;
|
||||
this.primaryConstructor = primaryConstructor;
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ public class LazySubstitutingClassDescriptor implements ClassDescriptor {
|
||||
typeConstructor = new TypeConstructorImpl(
|
||||
this,
|
||||
originalTypeConstructor.getAnnotations(),
|
||||
originalTypeConstructor.isSealed(),
|
||||
originalTypeConstructor.isFinal(),
|
||||
originalTypeConstructor.toString(),
|
||||
typeParameters,
|
||||
supertypes
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ public abstract class NumberValueTypeConstructor implements TypeConstructor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSealed() {
|
||||
public boolean isFinal() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class IntersectionTypeConstructor extends AnnotatedImpl implements TypeCo
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSealed() {
|
||||
public boolean isFinal() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,10 @@ public interface TypeConstructor extends Annotated {
|
||||
@NotNull
|
||||
Collection<JetType> getSupertypes();
|
||||
|
||||
boolean isSealed();
|
||||
/**
|
||||
* Cannot have subtypes.
|
||||
*/
|
||||
boolean isFinal();
|
||||
|
||||
/**
|
||||
* If the type is non-denotable, it can't be written in code directly, it only can appear internally inside a type checker.
|
||||
|
||||
@@ -32,7 +32,7 @@ public class TypeConstructorImpl extends AnnotatedImpl implements TypeConstructo
|
||||
private final List<TypeParameterDescriptor> parameters;
|
||||
private Collection<JetType> supertypes;
|
||||
private final String debugName;
|
||||
private final boolean sealed;
|
||||
private final boolean isFinal;
|
||||
|
||||
@Nullable
|
||||
private final ClassifierDescriptor classifierDescriptor;
|
||||
@@ -40,13 +40,13 @@ public class TypeConstructorImpl extends AnnotatedImpl implements TypeConstructo
|
||||
public TypeConstructorImpl(
|
||||
@Nullable ClassifierDescriptor classifierDescriptor,
|
||||
@NotNull List<AnnotationDescriptor> annotations,
|
||||
boolean sealed,
|
||||
boolean isFinal,
|
||||
@NotNull String debugName,
|
||||
@NotNull List<? extends TypeParameterDescriptor> parameters,
|
||||
@NotNull Collection<JetType> supertypes) {
|
||||
super(annotations);
|
||||
this.classifierDescriptor = classifierDescriptor;
|
||||
this.sealed = sealed;
|
||||
this.isFinal = isFinal;
|
||||
this.debugName = debugName;
|
||||
this.parameters = Collections.unmodifiableList(new ArrayList<TypeParameterDescriptor>(parameters));
|
||||
this.supertypes = Collections.unmodifiableCollection(supertypes);
|
||||
@@ -70,8 +70,8 @@ public class TypeConstructorImpl extends AnnotatedImpl implements TypeConstructo
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSealed() {
|
||||
return sealed;
|
||||
public boolean isFinal() {
|
||||
return isFinal;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -282,7 +282,7 @@ public class TypeUtils {
|
||||
if (type.isNullable()) {
|
||||
return true;
|
||||
}
|
||||
if (!type.getConstructor().isSealed()) {
|
||||
if (!type.getConstructor().isFinal()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user