Add JetType.isError()
Instead of ErrorUtils.isErrorType() which does several instanceof checks anyway
This commit is contained in:
+1
-1
@@ -397,7 +397,7 @@ public class SignaturesPropagationData {
|
||||
@NotNull List<TypeAndVariance> typesFromSuper,
|
||||
@NotNull TypeUsage howThisTypeIsUsed
|
||||
) {
|
||||
if (ErrorUtils.isErrorType(autoType)) {
|
||||
if (autoType.isError()) {
|
||||
return autoType;
|
||||
}
|
||||
|
||||
|
||||
+5
-2
@@ -19,7 +19,10 @@ package org.jetbrains.jet.descriptors.serialization;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.descriptors.*;
|
||||
import org.jetbrains.jet.lang.descriptors.annotations.Annotated;
|
||||
import org.jetbrains.jet.lang.types.*;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.TypeConstructor;
|
||||
import org.jetbrains.jet.lang.types.TypeProjection;
|
||||
import org.jetbrains.jet.lang.types.Variance;
|
||||
import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
|
||||
import org.jetbrains.jet.renderer.DescriptorRenderer;
|
||||
|
||||
@@ -325,7 +328,7 @@ public class DescriptorSerializer {
|
||||
|
||||
@NotNull
|
||||
public ProtoBuf.Type.Builder type(@NotNull JetType type) {
|
||||
assert !ErrorUtils.isErrorType(type) : "Can't serialize error types: " + type; // TODO
|
||||
assert !type.isError() : "Can't serialize error types: " + type; // TODO
|
||||
|
||||
ProtoBuf.Type.Builder builder = ProtoBuf.Type.newBuilder();
|
||||
|
||||
|
||||
+11
-5
@@ -26,7 +26,9 @@ import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassifierDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.TypeParameterDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.lazy.storage.*;
|
||||
import org.jetbrains.jet.lang.resolve.lazy.storage.MemoizedFunctionToNullable;
|
||||
import org.jetbrains.jet.lang.resolve.lazy.storage.NotNullLazyValue;
|
||||
import org.jetbrains.jet.lang.resolve.lazy.storage.StorageManager;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
||||
import org.jetbrains.jet.lang.types.*;
|
||||
import org.jetbrains.jet.lang.types.checker.JetTypeChecker;
|
||||
@@ -241,12 +243,11 @@ public class TypeDeserializer {
|
||||
|
||||
@NotNull
|
||||
private JetScope computeMemberScope() {
|
||||
TypeConstructor typeConstructor = getConstructor();
|
||||
if (ErrorUtils.isError(typeConstructor)) {
|
||||
return ErrorUtils.createErrorScope(typeConstructor.toString());
|
||||
if (isError()) {
|
||||
return ErrorUtils.createErrorScope(getConstructor().toString());
|
||||
}
|
||||
else {
|
||||
return getTypeMemberScope(typeConstructor, getArguments());
|
||||
return getTypeMemberScope(getConstructor(), getArguments());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,6 +257,11 @@ public class TypeDeserializer {
|
||||
return memberScope.compute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isError() {
|
||||
return ErrorUtils.isError(getConstructor());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AnnotationDescriptor> getAnnotations() {
|
||||
return Collections.emptyList();
|
||||
|
||||
+5
-2
@@ -26,7 +26,10 @@ import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.InnerClassesScopeWrapper;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.WritableScope;
|
||||
import org.jetbrains.jet.lang.types.*;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.TypeConstructor;
|
||||
import org.jetbrains.jet.lang.types.TypeConstructorImpl;
|
||||
import org.jetbrains.jet.lang.types.TypeUtils;
|
||||
import org.jetbrains.jet.renderer.DescriptorRenderer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -189,7 +192,7 @@ public abstract class MutableClassDescriptorLite extends ClassDescriptorBase {
|
||||
|
||||
|
||||
public void addSupertype(@NotNull JetType supertype) {
|
||||
assert !ErrorUtils.isErrorType(supertype) : "Error types must be filtered out in DescriptorResolver";
|
||||
assert !supertype.isError() : "Error types must be filtered out in DescriptorResolver";
|
||||
if (TypeUtils.getClassDescriptor(supertype) != null) {
|
||||
// See the Errors.SUPERTYPE_NOT_A_CLASS_OR_TRAIT
|
||||
supertypes.add(supertype);
|
||||
|
||||
+1
-2
@@ -23,7 +23,6 @@ import org.jetbrains.jet.lang.diagnostics.Errors;
|
||||
import org.jetbrains.jet.lang.psi.JetExpression;
|
||||
import org.jetbrains.jet.lang.psi.JetSimpleNameExpression;
|
||||
import org.jetbrains.jet.lang.psi.JetTypeConstraint;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lexer.JetKeywordToken;
|
||||
import org.jetbrains.jet.renderer.DescriptorRenderer;
|
||||
@@ -398,7 +397,7 @@ public class DefaultErrorMessages {
|
||||
@NotNull
|
||||
@Override
|
||||
public String render(@NotNull JetType type) {
|
||||
if (ErrorUtils.isErrorType(type)) return "";
|
||||
if (type.isError()) return "";
|
||||
return " of type '" + type.toString() + "'";
|
||||
}
|
||||
});
|
||||
|
||||
@@ -32,7 +32,6 @@ import org.jetbrains.jet.lang.psi.*;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.WritableScope;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
|
||||
import org.jetbrains.jet.renderer.DescriptorRenderer;
|
||||
|
||||
@@ -262,7 +261,7 @@ public class DeclarationResolver {
|
||||
private void createComponentFunctions(@NotNull MutableClassDescriptor classDescriptor, @NotNull ConstructorDescriptor constructorDescriptor) {
|
||||
int parameterIndex = 0;
|
||||
for (ValueParameterDescriptor parameter : constructorDescriptor.getValueParameters()) {
|
||||
if (!ErrorUtils.isErrorType(parameter.getType())) {
|
||||
if (!parameter.getType().isError()) {
|
||||
PropertyDescriptor property = trace.get(BindingContext.VALUE_PARAMETER_AS_PROPERTY, parameter);
|
||||
if (property != null) {
|
||||
++parameterIndex;
|
||||
|
||||
@@ -154,7 +154,7 @@ public class DescriptorResolver {
|
||||
}
|
||||
|
||||
private static void addValidSupertype(List<JetType> supertypes, JetType declaredSupertype) {
|
||||
if (!ErrorUtils.isErrorType(declaredSupertype)) {
|
||||
if (!declaredSupertype.isError()) {
|
||||
supertypes.add(declaredSupertype);
|
||||
}
|
||||
}
|
||||
@@ -1320,7 +1320,7 @@ public class DescriptorResolver {
|
||||
}
|
||||
|
||||
public static void checkBounds(@NotNull JetTypeReference typeReference, @NotNull JetType type, BindingTrace trace) {
|
||||
if (ErrorUtils.isErrorType(type)) return;
|
||||
if (type.isError()) return;
|
||||
|
||||
JetTypeElement typeElement = typeReference.getTypeElement();
|
||||
if (typeElement == null) return;
|
||||
|
||||
@@ -189,7 +189,7 @@ public class OverridingUtil {
|
||||
JetType superValueParameter = superValueParameters.get(i);
|
||||
JetType subValueParameter = subValueParameters.get(i);
|
||||
|
||||
boolean bothErrors = ErrorUtils.isErrorType(superValueParameter) && ErrorUtils.isErrorType(subValueParameter);
|
||||
boolean bothErrors = superValueParameter.isError() && subValueParameter.isError();
|
||||
if (!bothErrors && !JetTypeChecker.INSTANCE.equalTypes(superValueParameter, subValueParameter, axioms)) {
|
||||
return OverrideCompatibilityInfo.valueParameterTypeMismatch(superValueParameter, subValueParameter, OverrideCompatibilityInfo.Result.INCOMPATIBLE);
|
||||
}
|
||||
|
||||
+4
-2
@@ -34,7 +34,9 @@ import org.jetbrains.jet.lang.resolve.constants.CompileTimeConstantResolver;
|
||||
import org.jetbrains.jet.lang.resolve.constants.ErrorValue;
|
||||
import org.jetbrains.jet.lang.resolve.constants.NumberValueTypeConstructor;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
||||
import org.jetbrains.jet.lang.types.*;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.JetTypeInfo;
|
||||
import org.jetbrains.jet.lang.types.TypeUtils;
|
||||
import org.jetbrains.jet.lang.types.checker.JetTypeChecker;
|
||||
import org.jetbrains.jet.lang.types.expressions.ExpressionTypingServices;
|
||||
import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
|
||||
@@ -79,7 +81,7 @@ public class ArgumentTypeResolver {
|
||||
}
|
||||
|
||||
private static boolean isFunctionOrErrorType(@NotNull JetType supertype) {
|
||||
return KotlinBuiltIns.getInstance().isFunctionOrExtensionFunctionType(supertype) || ErrorUtils.isErrorType(supertype);
|
||||
return KotlinBuiltIns.getInstance().isFunctionOrExtensionFunctionType(supertype) || supertype.isError();
|
||||
}
|
||||
|
||||
public void checkTypesWithNoCallee(@NotNull CallResolutionContext<?> context) {
|
||||
|
||||
@@ -42,7 +42,6 @@ import org.jetbrains.jet.lang.resolve.calls.util.JetFakeReference;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.expressions.ExpressionTypingServices;
|
||||
import org.jetbrains.jet.lang.types.expressions.ExpressionTypingUtils;
|
||||
@@ -196,7 +195,7 @@ public class CallResolver {
|
||||
assert typeReference != null;
|
||||
JetType constructedType = typeResolver.resolveType(context.scope, typeReference, context.trace, true);
|
||||
|
||||
if (ErrorUtils.isErrorType(constructedType)) {
|
||||
if (constructedType.isError()) {
|
||||
return checkArgumentTypesAndFail(context);
|
||||
}
|
||||
|
||||
@@ -240,7 +239,7 @@ public class CallResolver {
|
||||
|
||||
if (!KotlinBuiltIns.getInstance().isFunctionOrExtensionFunctionType(calleeType)) {
|
||||
// checkTypesWithNoCallee(trace, scope, call);
|
||||
if (!ErrorUtils.isErrorType(calleeType)) {
|
||||
if (!calleeType.isError()) {
|
||||
context.trace.report(CALLEE_NOT_A_FUNCTION.on(calleeExpression, calleeType));
|
||||
}
|
||||
return checkArgumentTypesAndFail(context);
|
||||
|
||||
@@ -652,7 +652,7 @@ public class CandidateResolver {
|
||||
constraintSystem.addSubtypeConstraint(type, effectiveExpectedType, ConstraintPosition.getValueParameterPosition(
|
||||
valueParameterDescriptor.getIndex()));
|
||||
if (isErrorType != null) {
|
||||
isErrorType[0] = type == null || ErrorUtils.isErrorType(type);
|
||||
isErrorType[0] = type == null || type.isError();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -756,7 +756,7 @@ public class CandidateResolver {
|
||||
JetType type = typeInfoForCall.getType();
|
||||
infoForArguments.updateInfo(argument, typeInfoForCall.getDataFlowInfo());
|
||||
|
||||
if (type == null || (ErrorUtils.isErrorType(type) && type != PLACEHOLDER_FUNCTION_TYPE)) {
|
||||
if (type == null || (type.isError() && type != PLACEHOLDER_FUNCTION_TYPE)) {
|
||||
candidateCall.argumentHasNoType();
|
||||
argumentTypes.add(type);
|
||||
}
|
||||
|
||||
+1
-1
@@ -267,7 +267,7 @@ public class ConstraintSystemImpl implements ConstraintSystem {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (type == null || ((ErrorUtils.isErrorType(type) && type != PLACEHOLDER_FUNCTION_TYPE))) {
|
||||
if (type == null || (type.isError() && type != PLACEHOLDER_FUNCTION_TYPE)) {
|
||||
hasErrorInConstrainingTypes = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-2
@@ -26,7 +26,6 @@ import org.jetbrains.jet.lang.diagnostics.AbstractDiagnosticFactory;
|
||||
import org.jetbrains.jet.lang.diagnostics.Diagnostic;
|
||||
import org.jetbrains.jet.lang.psi.JetConstantExpression;
|
||||
import org.jetbrains.jet.lang.psi.JetElement;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.TypeConstructor;
|
||||
import org.jetbrains.jet.lang.types.TypeUtils;
|
||||
@@ -353,6 +352,6 @@ public class CompileTimeConstantResolver {
|
||||
}
|
||||
|
||||
private static boolean noExpectedTypeOrError(JetType expectedType) {
|
||||
return TypeUtils.noExpectedType(expectedType) || ErrorUtils.isErrorType(expectedType);
|
||||
return TypeUtils.noExpectedType(expectedType) || expectedType.isError();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -46,7 +46,6 @@ import org.jetbrains.jet.lang.resolve.lazy.storage.NullableLazyValue;
|
||||
import org.jetbrains.jet.lang.resolve.lazy.storage.StorageManager;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.*;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.TypeConstructor;
|
||||
import org.jetbrains.jet.lang.types.TypeUtils;
|
||||
@@ -62,7 +61,7 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements LazyDesc
|
||||
private static final Predicate<JetType> VALID_SUPERTYPE = new Predicate<JetType>() {
|
||||
@Override
|
||||
public boolean apply(JetType type) {
|
||||
assert !ErrorUtils.isErrorType(type) : "Error types must be filtered out in DescriptorResolver";
|
||||
assert !type.isError() : "Error types must be filtered out in DescriptorResolver";
|
||||
return TypeUtils.getClassDescriptor(type) != null;
|
||||
}
|
||||
};
|
||||
|
||||
+1
-2
@@ -33,7 +33,6 @@ import org.jetbrains.jet.lang.resolve.lazy.storage.NullableLazyValue;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
||||
import org.jetbrains.jet.lang.types.DeferredType;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
|
||||
import org.jetbrains.jet.util.lazy.RecursionIntolerantLazyValue;
|
||||
@@ -166,7 +165,7 @@ public class LazyClassMemberScope extends AbstractLazyMemberScope<LazyClassDescr
|
||||
|
||||
int parameterIndex = 0;
|
||||
for (ValueParameterDescriptor parameter : constructor.getValueParameters()) {
|
||||
if (ErrorUtils.isErrorType(parameter.getType())) continue;
|
||||
if (parameter.getType().isError()) continue;
|
||||
Set<VariableDescriptor> properties = getProperties(parameter.getName());
|
||||
if (properties.isEmpty()) continue;
|
||||
assert properties.size() == 1 : "A constructor parameter is resolved to more than one (" + properties.size() + ") property: " + parameter;
|
||||
|
||||
@@ -61,7 +61,7 @@ public class CommonSupertypes {
|
||||
if (KotlinBuiltIns.getInstance().isNothingOrNullableNothing(type)) {
|
||||
iterator.remove();
|
||||
}
|
||||
if (ErrorUtils.isErrorType(type)) {
|
||||
if (type.isError()) {
|
||||
return ErrorUtils.createErrorType("Supertype of error type " + type);
|
||||
}
|
||||
nullable |= type.isNullable();
|
||||
|
||||
@@ -57,6 +57,11 @@ public class DeferredType implements JetType {
|
||||
return getActualType().getMemberScope();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isError() {
|
||||
return getActualType().isError();
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public TypeConstructor getConstructor() {
|
||||
|
||||
@@ -36,8 +36,6 @@ import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static org.jetbrains.jet.lang.types.TypeUtils.noExpectedType;
|
||||
|
||||
public class ErrorUtils {
|
||||
|
||||
private static final ModuleDescriptor ERROR_MODULE;
|
||||
@@ -387,20 +385,10 @@ public class ErrorUtils {
|
||||
return typeConstructor == ERROR_CLASS.getTypeConstructor() || typeConstructor instanceof ErrorTypeConstructor;
|
||||
}
|
||||
|
||||
public static boolean isErrorType(@NotNull JetType type) {
|
||||
return !noExpectedType(type) && !(type instanceof NamespaceType) &&
|
||||
(
|
||||
(type instanceof DeferredType && (((DeferredType) type).getActualType() == null
|
||||
|| isErrorType(((DeferredType) type).getActualType()))) ||
|
||||
type instanceof ErrorTypeImpl ||
|
||||
isError(type.getConstructor())
|
||||
);
|
||||
}
|
||||
|
||||
public static boolean containsErrorType(@Nullable JetType type) {
|
||||
if (type == null) return false;
|
||||
if (type instanceof NamespaceType) return false;
|
||||
if (isErrorType(type)) return true;
|
||||
if (type.isError()) return true;
|
||||
for (TypeProjection projection : type.getArguments()) {
|
||||
if (containsErrorType(projection.getType())) return true;
|
||||
}
|
||||
@@ -455,6 +443,11 @@ public class ErrorUtils {
|
||||
return memberScope;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isError() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AnnotationDescriptor> getAnnotations() {
|
||||
return Collections.emptyList();
|
||||
|
||||
@@ -28,12 +28,16 @@ import java.util.List;
|
||||
*/
|
||||
public interface JetType extends Annotated {
|
||||
@NotNull TypeConstructor getConstructor();
|
||||
|
||||
@NotNull List<TypeProjection> getArguments();
|
||||
|
||||
boolean isNullable();
|
||||
|
||||
@NotNull
|
||||
JetScope getMemberScope();
|
||||
|
||||
boolean isError();
|
||||
|
||||
@Override
|
||||
boolean equals(Object other);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public final class JetTypeImpl extends AnnotatedImpl implements JetType {
|
||||
super(annotations);
|
||||
|
||||
if (memberScope instanceof ErrorUtils.ErrorScope) {
|
||||
throw new IllegalStateException();
|
||||
throw new IllegalStateException("JetTypeImpl should not be created for error type: " + memberScope + "\n" + constructor);
|
||||
}
|
||||
|
||||
this.constructor = constructor;
|
||||
@@ -81,6 +81,11 @@ public final class JetTypeImpl extends AnnotatedImpl implements JetType {
|
||||
return memberScope;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isError() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return TypeUtils.toString(this);
|
||||
@@ -98,7 +103,7 @@ public final class JetTypeImpl extends AnnotatedImpl implements JetType {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = constructor != null ? constructor.hashCode() : 0;
|
||||
int result = constructor.hashCode();
|
||||
result = 31 * result + arguments.hashCode();
|
||||
result = 31 * result + (nullable ? 1 : 0);
|
||||
return result;
|
||||
|
||||
@@ -43,6 +43,11 @@ public class NamespaceType implements JetType {
|
||||
return memberScope;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isError() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public TypeConstructor getConstructor() {
|
||||
|
||||
@@ -144,7 +144,7 @@ public class TypeSubstitutor {
|
||||
assertRecursionDepth(recursionDepth, originalProjection, substitution);
|
||||
// The type is within the substitution range, i.e. T or T?
|
||||
JetType type = originalProjection.getType();
|
||||
if (KotlinBuiltIns.getInstance().isNothing(type) || ErrorUtils.isErrorType(type)) return originalProjection;
|
||||
if (KotlinBuiltIns.getInstance().isNothing(type) || type.isError()) return originalProjection;
|
||||
|
||||
TypeProjection replacement = substitution.get(type.getConstructor());
|
||||
|
||||
|
||||
@@ -26,9 +26,13 @@ import com.intellij.util.Processor;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.descriptors.*;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassifierDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.TypeParameterDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.calls.inference.*;
|
||||
import org.jetbrains.jet.lang.resolve.calls.inference.ConstraintPosition;
|
||||
import org.jetbrains.jet.lang.resolve.calls.inference.ConstraintSystemImpl;
|
||||
import org.jetbrains.jet.lang.resolve.constants.NumberValueTypeConstructor;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.ChainedScope;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
||||
@@ -69,6 +73,11 @@ public class TypeUtils {
|
||||
throw new IllegalStateException(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isError() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AnnotationDescriptor> getAnnotations() {
|
||||
throw new IllegalStateException(name);
|
||||
@@ -103,7 +112,7 @@ public class TypeUtils {
|
||||
if (type.isNullable() == nullable) {
|
||||
return type;
|
||||
}
|
||||
if (ErrorUtils.isErrorType(type)) {
|
||||
if (type.isError()) {
|
||||
return type;
|
||||
}
|
||||
return new JetTypeImpl(type.getAnnotations(), type.getConstructor(), nullable, type.getArguments(), type.getMemberScope());
|
||||
@@ -624,7 +633,7 @@ public class TypeUtils {
|
||||
@NotNull NumberValueTypeConstructor numberValueTypeConstructor,
|
||||
@NotNull JetType expectedType
|
||||
) {
|
||||
if (noExpectedType(expectedType) || ErrorUtils.isErrorType(expectedType)) {
|
||||
if (noExpectedType(expectedType) || expectedType.isError()) {
|
||||
return getDefaultPrimitiveNumberType(numberValueTypeConstructor);
|
||||
}
|
||||
for (JetType primitiveNumberType : numberValueTypeConstructor.getSupertypes()) {
|
||||
|
||||
+2
-2
@@ -156,7 +156,7 @@ public class TypeCheckingProcedure {
|
||||
}
|
||||
|
||||
public boolean isSubtypeOf(@NotNull JetType subtype, @NotNull JetType supertype) {
|
||||
if (ErrorUtils.isErrorType(subtype) || ErrorUtils.isErrorType(supertype)) {
|
||||
if (subtype.isError() || supertype.isError()) {
|
||||
return true;
|
||||
}
|
||||
if (!supertype.isNullable() && subtype.isNullable()) {
|
||||
@@ -194,7 +194,7 @@ public class TypeCheckingProcedure {
|
||||
JetType superIn = getInType(parameter, superArgument);
|
||||
JetType superOut = getOutType(parameter, superArgument);
|
||||
|
||||
boolean argumentIsErrorType = ErrorUtils.isErrorType(subArgument.getType()) || ErrorUtils.isErrorType(superArgument.getType());
|
||||
boolean argumentIsErrorType = subArgument.getType().isError() || superArgument.getType().isError();
|
||||
if (!argumentIsErrorType && parameter.getVariance() == INVARIANT
|
||||
&& subArgument.getProjectionKind() == INVARIANT && superArgument.getProjectionKind() == INVARIANT) {
|
||||
if (!constraints.assertEqualTypes(subArgument.getType(), superArgument.getType(), this)) return false;
|
||||
|
||||
+4
-4
@@ -360,7 +360,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
}
|
||||
|
||||
boolean validClassifier = classifierCandidate != null && !ErrorUtils.isError(classifierCandidate);
|
||||
boolean validType = supertype != null && !ErrorUtils.isErrorType(supertype);
|
||||
boolean validType = supertype != null && !supertype.isError();
|
||||
if (result == null && (validClassifier || validType)) {
|
||||
context.trace.report(NOT_A_SUPERTYPE.on(superTypeQualifier));
|
||||
}
|
||||
@@ -704,7 +704,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
return baseTypeInfo;
|
||||
}
|
||||
DataFlowInfo dataFlowInfo = baseTypeInfo.getDataFlowInfo();
|
||||
if (isKnownToBeNotNull(baseExpression, context) && !ErrorUtils.isErrorType(baseType)) {
|
||||
if (isKnownToBeNotNull(baseExpression, context) && !baseType.isError()) {
|
||||
context.trace.report(UNNECESSARY_NOT_NULL_ASSERTION.on(operationSign, baseType));
|
||||
}
|
||||
else {
|
||||
@@ -870,7 +870,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
DataFlowInfo dataFlowInfo = typeInfo.getDataFlowInfo();
|
||||
JetType compareToReturnType = typeInfo.getType();
|
||||
JetType type = null;
|
||||
if (compareToReturnType != null && !ErrorUtils.isErrorType(compareToReturnType)) {
|
||||
if (compareToReturnType != null && !compareToReturnType.isError()) {
|
||||
TypeConstructor constructor = compareToReturnType.getConstructor();
|
||||
KotlinBuiltIns builtIns = KotlinBuiltIns.getInstance();
|
||||
TypeConstructor intTypeConstructor = builtIns.getInt().getTypeConstructor();
|
||||
@@ -1013,7 +1013,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
|
||||
JetSimpleNameExpression operationSign = expression.getOperationReference();
|
||||
JetType type = facade.getTypeInfo(expr, context).getType();
|
||||
if (type == null || ErrorUtils.isErrorType(type)) return;
|
||||
if (type == null || type.isError()) return;
|
||||
|
||||
DataFlowValue value = DataFlowValueFactory.createDataFlowValue(expr, type, context.trace.getBindingContext());
|
||||
Nullability nullability = context.dataFlowInfo.getNullability(value);
|
||||
|
||||
@@ -29,7 +29,6 @@ import org.jetbrains.jet.lang.resolve.calls.autocasts.DataFlowValue;
|
||||
import org.jetbrains.jet.lang.resolve.calls.autocasts.DataFlowValueFactory;
|
||||
import org.jetbrains.jet.lang.resolve.calls.context.ResolutionContext;
|
||||
import org.jetbrains.jet.lang.resolve.constants.CompileTimeConstantResolver;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.JetTypeInfo;
|
||||
import org.jetbrains.jet.lang.types.TypeUtils;
|
||||
@@ -40,9 +39,7 @@ import org.jetbrains.jet.lexer.JetTokens;
|
||||
import static org.jetbrains.jet.lang.diagnostics.Errors.*;
|
||||
import static org.jetbrains.jet.lang.resolve.BindingContext.AUTOCAST;
|
||||
import static org.jetbrains.jet.lang.resolve.calls.context.ContextDependency.INDEPENDENT;
|
||||
import static org.jetbrains.jet.lang.types.TypeUtils.NO_EXPECTED_TYPE;
|
||||
import static org.jetbrains.jet.lang.types.TypeUtils.UNIT_EXPECTED_TYPE;
|
||||
import static org.jetbrains.jet.lang.types.TypeUtils.noExpectedType;
|
||||
import static org.jetbrains.jet.lang.types.TypeUtils.*;
|
||||
|
||||
public class DataFlowUtils {
|
||||
private DataFlowUtils() {
|
||||
@@ -208,7 +205,7 @@ public class DataFlowUtils {
|
||||
|
||||
@Nullable
|
||||
public static JetType checkStatementType(@NotNull JetExpression expression, @NotNull ResolutionContext context) {
|
||||
if (!noExpectedType(context.expectedType) && !KotlinBuiltIns.getInstance().isUnit(context.expectedType) && !ErrorUtils.isErrorType(context.expectedType)) {
|
||||
if (!noExpectedType(context.expectedType) && !KotlinBuiltIns.getInstance().isUnit(context.expectedType) && !context.expectedType.isError()) {
|
||||
context.trace.report(EXPECTED_TYPE_MISMATCH.on(expression, context.expectedType));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ public class DescriptorRendererImpl implements DescriptorRenderer {
|
||||
if (type == ExpressionTypingUtils.CANT_INFER_LAMBDA_PARAM_TYPE || type == CallResolverUtil.CANT_INFER_TYPE_PARAMETER) {
|
||||
return "???";
|
||||
}
|
||||
if (ErrorUtils.isErrorType(type)) {
|
||||
if (type.isError()) {
|
||||
return type.toString();
|
||||
}
|
||||
if (KotlinBuiltIns.getInstance().isFunctionOrExtensionFunctionType(type) && prettyFunctionTypes) {
|
||||
|
||||
@@ -22,7 +22,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.descriptors.*;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
|
||||
import java.io.PrintStream;
|
||||
@@ -90,7 +89,7 @@ public class DescriptorValidator {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!allowErrorTypes && ErrorUtils.isErrorType(type)) {
|
||||
if (!allowErrorTypes && type.isError()) {
|
||||
report(collector, descriptor, "Error type: " + type);
|
||||
return;
|
||||
}
|
||||
@@ -155,7 +154,7 @@ public class DescriptorValidator {
|
||||
JetType expected,
|
||||
JetType actual
|
||||
) {
|
||||
if (ErrorUtils.isErrorType(expected) && ErrorUtils.isErrorType(actual)) {
|
||||
if (expected.isError() && actual.isError()) {
|
||||
assertEquals(descriptor, collector, name, expected.toString(), actual.toString());
|
||||
}
|
||||
else if (!expected.equals(actual)) {
|
||||
|
||||
@@ -42,7 +42,6 @@ import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.*;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.receivers.ExpressionReceiver;
|
||||
import org.jetbrains.jet.lang.types.CommonSupertypes;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.TypeUtils;
|
||||
import org.jetbrains.jet.lang.types.checker.JetTypeChecker;
|
||||
@@ -541,7 +540,7 @@ public class JetTypeCheckerTest extends JetLiteFixture {
|
||||
Project project = getProject();
|
||||
JetExpression jetExpression = JetPsiFactory.createExpression(project, expression);
|
||||
JetType type = expressionTypingServices.safeGetType(scopeWithImports, jetExpression, TypeUtils.NO_EXPECTED_TYPE, DataFlowInfo.EMPTY, JetTestUtils.DUMMY_TRACE);
|
||||
assertTrue("Error type expected but " + type + " returned", ErrorUtils.isErrorType(type));
|
||||
assertTrue("Error type expected but " + type + " returned", type.isError());
|
||||
}
|
||||
|
||||
private void assertType(String contextType, final String expression, String expectedType) {
|
||||
|
||||
+1
-2
@@ -24,7 +24,6 @@ import org.jetbrains.jet.lang.resolve.java.structure.JavaClass;
|
||||
import org.jetbrains.jet.lang.resolve.java.structure.JavaClassifier;
|
||||
import org.jetbrains.jet.lang.resolve.java.structure.JavaClassifierType;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.TypeUtils;
|
||||
import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
|
||||
@@ -102,7 +101,7 @@ public final class JavaSupertypeResolver {
|
||||
}
|
||||
|
||||
JetType transformed = typeTransformer.transformToType(type, TypeUsage.SUPERTYPE, typeVariableResolver);
|
||||
if (ErrorUtils.isErrorType(transformed)) {
|
||||
if (transformed.isError()) {
|
||||
// TODO: report INCOMPLETE_HIERARCHY
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -45,7 +45,6 @@ import org.jetbrains.jet.lang.resolve.lazy.ResolveSessionUtils;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.expressions.ExpressionTypingUtils;
|
||||
import org.jetbrains.jet.plugin.caches.resolve.IDELightClassGenerationSupport;
|
||||
@@ -301,7 +300,7 @@ public class JetShortNamesCache extends PsiShortNamesCache {
|
||||
JetType expressionType = context.get(BindingContext.EXPRESSION_TYPE, receiverExpression);
|
||||
JetScope scope = context.get(BindingContext.RESOLUTION_SCOPE, receiverExpression);
|
||||
|
||||
if (expressionType == null || scope == null || ErrorUtils.isErrorType(expressionType)) {
|
||||
if (expressionType == null || scope == null || expressionType.isError()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.JetScopeUtils;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.receivers.ExpressionReceiver;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.NamespaceType;
|
||||
import org.jetbrains.jet.lang.types.expressions.ExpressionTypingUtils;
|
||||
@@ -60,7 +59,7 @@ public final class TipsManager {
|
||||
JetScope resolutionScope = context.get(BindingContext.RESOLUTION_SCOPE, expression);
|
||||
JetType expressionType = context.get(BindingContext.EXPRESSION_TYPE, receiverExpression);
|
||||
|
||||
if (expressionType != null && resolutionScope != null && !ErrorUtils.isErrorType(expressionType)) {
|
||||
if (expressionType != null && resolutionScope != null && !expressionType.isError()) {
|
||||
if (!(expressionType instanceof NamespaceType)) {
|
||||
ExpressionReceiver receiverValue = new ExpressionReceiver(receiverExpression, expressionType);
|
||||
Set<DeclarationDescriptor> descriptors = new HashSet<DeclarationDescriptor>();
|
||||
|
||||
+1
-2
@@ -28,7 +28,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.descriptors.VariableDescriptor;
|
||||
import org.jetbrains.jet.lang.psi.*;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.plugin.codeInsight.CodeInsightUtils;
|
||||
import org.jetbrains.jet.plugin.codeInsight.ReferenceToClassesShortening;
|
||||
@@ -131,7 +130,7 @@ public class MoveDeclarationsOutHelper {
|
||||
if (typeRef != null) {
|
||||
typeString = typeRef.getText();
|
||||
}
|
||||
else if (!ErrorUtils.isErrorType(propertyType)) {
|
||||
else if (!propertyType.isError()) {
|
||||
typeString = DescriptorRenderer.TEXT.renderType(propertyType);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ import com.intellij.psi.util.PsiTreeUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.psi.*;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.plugin.JetBundle;
|
||||
import org.jetbrains.jet.plugin.codeInsight.ReferenceToClassesShortening;
|
||||
@@ -71,8 +70,7 @@ public class ReconstructTypeInCastOrIsAction extends PsiElementBaseIntentionActi
|
||||
}
|
||||
|
||||
JetType type = getReconstructedType(typeRef);
|
||||
if (type == null) return false;
|
||||
if (ErrorUtils.isErrorType(type)) return false;
|
||||
if (type == null || type.isError()) return false;
|
||||
|
||||
// No type parameters expected => nothing to reconstruct
|
||||
if (type.getConstructor().getParameters().isEmpty()) return false;
|
||||
|
||||
@@ -135,7 +135,7 @@ public class SpecifyTypeExplicitlyAction extends PsiElementBaseIntentionAction {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ErrorUtils.isErrorType(getTypeForDeclaration(declaration))) {
|
||||
if (getTypeForDeclaration(declaration).isError()) {
|
||||
return false;
|
||||
}
|
||||
return !hasPublicMemberDiagnostic(declaration);
|
||||
@@ -217,7 +217,7 @@ public class SpecifyTypeExplicitlyAction extends PsiElementBaseIntentionAction {
|
||||
@NotNull PsiElement anchor,
|
||||
@NotNull JetType exprType
|
||||
) {
|
||||
assert !ErrorUtils.isErrorType(exprType) : "Unexpected error type: " + namedDeclaration.getText();
|
||||
assert !exprType.isError() : "Unexpected error type: " + namedDeclaration.getText();
|
||||
|
||||
ClassifierDescriptor descriptor = exprType.getConstructor().getDeclarationDescriptor();
|
||||
boolean isAnonymous = descriptor != null && DescriptorUtils.isAnonymous(descriptor);
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.psi.*;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lexer.JetTokens;
|
||||
import org.jetbrains.jet.plugin.codeInsight.ReferenceToClassesShortening;
|
||||
@@ -93,7 +92,7 @@ public class DeclarationUtils {
|
||||
property.getInitializer()
|
||||
);
|
||||
|
||||
return type == null || ErrorUtils.isErrorType(type) ? null : type;
|
||||
return type == null || type.isError() ? null : type;
|
||||
}
|
||||
|
||||
// returns assignment which replaces initializer
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.intellij.util.IncorrectOperationException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.diagnostics.Diagnostic;
|
||||
import org.jetbrains.jet.lang.psi.*;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.plugin.JetBundle;
|
||||
import org.jetbrains.jet.renderer.DescriptorRenderer;
|
||||
@@ -42,7 +41,7 @@ public class ChangeAccessorTypeFix extends JetIntentionAction<JetPropertyAccesso
|
||||
JetProperty property = PsiTreeUtil.getParentOfType(element, JetProperty.class);
|
||||
if (property == null) return false;
|
||||
JetType type = QuickFixUtil.getDeclarationReturnType(property);
|
||||
if (super.isAvailable(project, editor, file) && type != null && !ErrorUtils.isErrorType(type)) {
|
||||
if (super.isAvailable(project, editor, file) && type != null && !type.isError()) {
|
||||
renderedType = DescriptorRenderer.SHORT_NAMES_IN_TYPES.renderType(type);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ import org.jetbrains.jet.lang.resolve.ImportPath;
|
||||
import org.jetbrains.jet.lang.resolve.java.JavaBridgeConfiguration;
|
||||
import org.jetbrains.jet.lang.resolve.java.JavaDescriptorResolver;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.TypeUtils;
|
||||
import org.jetbrains.jet.plugin.JetPluginUtil;
|
||||
@@ -56,7 +55,7 @@ public class ImportInsertHelper {
|
||||
* @param file file where import directive should be added
|
||||
*/
|
||||
public static void addImportDirectivesIfNeeded(@NotNull JetType type, @NotNull JetFile file) {
|
||||
if (JetPluginUtil.checkTypeIsStandard(type, file.getProject()) || ErrorUtils.isErrorType(type)) {
|
||||
if (JetPluginUtil.checkTypeIsStandard(type, file.getProject()) || type.isError()) {
|
||||
return;
|
||||
}
|
||||
BindingContext bindingContext = AnalyzerFacadeWithCache.analyzeFileWithCache(file).getBindingContext();
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.intellij.util.IncorrectOperationException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.diagnostics.Diagnostic;
|
||||
import org.jetbrains.jet.lang.psi.*;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.plugin.JetBundle;
|
||||
import org.jetbrains.jet.plugin.intentions.SpecifyTypeExplicitlyAction;
|
||||
@@ -86,7 +85,7 @@ public class RemovePartsFromPropertyFix extends JetIntentionAction<JetProperty>
|
||||
@Override
|
||||
public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
|
||||
JetType type = QuickFixUtil.getDeclarationReturnType(element);
|
||||
return super.isAvailable(project, editor, file) && type != null && !ErrorUtils.isErrorType(type);
|
||||
return super.isAvailable(project, editor, file) && type != null && !type.isError();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,7 +25,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.psi.JetNamedDeclaration;
|
||||
import org.jetbrains.jet.lang.psi.JetNamedFunction;
|
||||
import org.jetbrains.jet.lang.psi.JetProperty;
|
||||
import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.plugin.JetBundle;
|
||||
|
||||
@@ -70,6 +69,6 @@ public class SpecifyTypeExplicitlyFix extends PsiElementBaseIntentionAction {
|
||||
assert false : "Couldn't find property or function";
|
||||
}
|
||||
|
||||
return !ErrorUtils.isErrorType(getTypeForDeclaration(declaration));
|
||||
return !getTypeForDeclaration(declaration).isError();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user