org.jetbrains.kotlin.diagnostics.Errors Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-compiler-embeddable Show documentation
Show all versions of kotlin-compiler-embeddable Show documentation
the Kotlin compiler embeddable
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.diagnostics;
import com.google.common.collect.ImmutableSet;
import com.intellij.psi.PsiElement;
import com.intellij.psi.impl.source.tree.LeafPsiElement;
import kotlin.Pair;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.config.LanguageFeature;
import org.jetbrains.kotlin.config.LanguageVersionSettings;
import org.jetbrains.kotlin.descriptors.*;
import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor;
import org.jetbrains.kotlin.diagnostics.rendering.DeclarationWithDiagnosticComponents;
import org.jetbrains.kotlin.diagnostics.rendering.DefaultErrorMessages;
import org.jetbrains.kotlin.diagnostics.rendering.DiagnosticFactoryToRendererMap;
import org.jetbrains.kotlin.diagnostics.rendering.DiagnosticRenderer;
import org.jetbrains.kotlin.lexer.KtKeywordToken;
import org.jetbrains.kotlin.lexer.KtModifierKeywordToken;
import org.jetbrains.kotlin.lexer.KtTokens;
import org.jetbrains.kotlin.metadata.deserialization.VersionRequirement;
import org.jetbrains.kotlin.name.ClassId;
import org.jetbrains.kotlin.name.FqName;
import org.jetbrains.kotlin.name.Name;
import org.jetbrains.kotlin.psi.*;
import org.jetbrains.kotlin.resolve.VarianceConflictDiagnosticData;
import org.jetbrains.kotlin.resolve.calls.inference.InferenceErrorData;
import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintPosition;
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall;
import org.jetbrains.kotlin.resolve.calls.tower.CandidateApplicability;
import org.jetbrains.kotlin.resolve.calls.tower.WrongResolutionToClassifier;
import org.jetbrains.kotlin.resolve.calls.util.BuilderLambdaLabelingInfo;
import org.jetbrains.kotlin.resolve.deprecation.DescriptorBasedDeprecationInfo;
import org.jetbrains.kotlin.resolve.multiplatform.ExpectActualAnnotationsIncompatibilityType;
import org.jetbrains.kotlin.resolve.multiplatform.K1ExpectActualCompatibility.Incompatible;
import org.jetbrains.kotlin.resolve.multiplatform.K1ExpectActualMemberDiff;
import org.jetbrains.kotlin.serialization.deserialization.IncompatibleVersionErrorData;
import org.jetbrains.kotlin.types.KotlinType;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.*;
import static org.jetbrains.kotlin.diagnostics.ClassicPositioningStrategies.ACTUAL_DECLARATION_NAME;
import static org.jetbrains.kotlin.diagnostics.ClassicPositioningStrategies.INCOMPATIBLE_DECLARATION;
import static org.jetbrains.kotlin.diagnostics.PositioningStrategies.*;
import static org.jetbrains.kotlin.diagnostics.Severity.*;
/**
* For error messages, see DefaultErrorMessages and IdeErrorMessages.
*/
public interface Errors {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Meta-errors: unsupported features, failure
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DiagnosticFactory1 UNSUPPORTED = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 UNSUPPORTED_WARNING = DiagnosticFactory1.create(WARNING);
DiagnosticFactory1 NEW_INFERENCE_ERROR = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 NEW_INFERENCE_DIAGNOSTIC = DiagnosticFactory1.create(WARNING);
DiagnosticFactory2 NEW_INFERENCE_UNKNOWN_ERROR = DiagnosticFactory2.create(ERROR);
DiagnosticFactory0 NON_APPLICABLE_CALL_FOR_BUILDER_INFERENCE = DiagnosticFactory0.create(WARNING);
DiagnosticFactory1> UNSUPPORTED_FEATURE = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 EXCEPTION_FROM_ANALYZER = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 MISSING_STDLIB = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1> EXPERIMENTAL_FEATURE_WARNING =
DiagnosticFactory1.create(WARNING);
DiagnosticFactory0 EXPLICIT_BACKING_FIELDS_UNSUPPORTED = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 UNSUPPORTED_INHERITANCE_FROM_JAVA_MEMBER_REFERENCING_KOTLIN_FUNCTION = DiagnosticFactory1.create(ERROR);
DiagnosticFactory0 UNSUPPORTED_SEALED_WHEN = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 UNSUPPORTED_SEALED_FUN_INTERFACE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 UNSUPPORTED_SUSPEND_TEST = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 UNSUPPORTED_REFERENCES_TO_VARIABLES_AND_PARAMETERS = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 UNSUPPORTED_CLASS_LITERALS_WITH_EMPTY_LHS = DiagnosticFactory0.create(ERROR);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Generic errors/warnings: applicable in many contexts
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DiagnosticFactory1> REDECLARATION =
DiagnosticFactory1.create(ERROR, FOR_REDECLARATION);
DiagnosticFactory1 PACKAGE_OR_CLASSIFIER_REDECLARATION =
DiagnosticFactory1.create(ERROR, FOR_REDECLARATION);
DiagnosticFactory0 DUPLICATE_PARAMETER_NAME_IN_FUNCTION_TYPE = DiagnosticFactory0.create(ERROR, DECLARATION_NAME);
DiagnosticFactory1 EXTENSION_SHADOWED_BY_MEMBER =
DiagnosticFactory1.create(WARNING, FOR_REDECLARATION);
DiagnosticFactory1 EXTENSION_FUNCTION_SHADOWED_BY_INNER_CLASS_CONSTRUCTOR =
DiagnosticFactory1.create(WARNING, FOR_REDECLARATION);
DiagnosticFactory2 EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE =
DiagnosticFactory2.create(WARNING, FOR_REDECLARATION);
DiagnosticFactory1 UNRESOLVED_REFERENCE =
DiagnosticFactory1.create(ERROR, FOR_UNRESOLVED_REFERENCE);
DiagnosticFactory2 DEPRECATION = DiagnosticFactory2.create(WARNING);
DiagnosticFactory2 DEPRECATION_ERROR = DiagnosticFactory2.create(ERROR);
DiagnosticFactory3 TYPEALIAS_EXPANSION_DEPRECATION =
DiagnosticFactory3.create(WARNING);
DiagnosticFactory3 TYPEALIAS_EXPANSION_DEPRECATION_ERROR =
DiagnosticFactory3.create(ERROR);
DiagnosticFactory3>
VERSION_REQUIREMENT_DEPRECATION = DiagnosticFactory3.create(WARNING);
DiagnosticFactory3>
VERSION_REQUIREMENT_DEPRECATION_ERROR = DiagnosticFactory3.create(ERROR);
// descriptor and deprecation infos are needed only for IDE quickfix for this warning
DiagnosticFactory3> OVERRIDE_DEPRECATION =
DiagnosticFactory3.create(WARNING, DECLARATION_NAME);
DiagnosticFactory0 DEPRECATED_SINCE_KOTLIN_WITHOUT_DEPRECATED = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 DEPRECATED_SINCE_KOTLIN_WITH_DEPRECATED_LEVEL = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 DEPRECATED_SINCE_KOTLIN_WITH_UNORDERED_VERSIONS = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 DEPRECATED_SINCE_KOTLIN_WITHOUT_ARGUMENTS = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 DEPRECATED_SINCE_KOTLIN_OUTSIDE_KOTLIN_SUBPACKAGE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory2 API_NOT_AVAILABLE = DiagnosticFactory2.create(ERROR);
DiagnosticFactory1 MISSING_DEPENDENCY_CLASS = DiagnosticFactory1.create(ERROR);
DiagnosticFactory2 MISSING_DEPENDENCY_SUPERCLASS = DiagnosticFactory2.create(ERROR);
DiagnosticFactory1 MISSING_BUILT_IN_DECLARATION = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 MISSING_SCRIPT_BASE_CLASS = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 MISSING_SCRIPT_STANDARD_TEMPLATE = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 MISSING_SCRIPT_RECEIVER_CLASS = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 MISSING_IMPORTED_SCRIPT_FILE = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 MISSING_IMPORTED_SCRIPT_PSI = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 MISSING_SCRIPT_PROVIDED_PROPERTY_CLASS = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 PRE_RELEASE_CLASS = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 IR_WITH_UNSTABLE_ABI_COMPILED_CLASS = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 FIR_COMPILED_CLASS = DiagnosticFactory1.create(ERROR);
DiagnosticFactory2> INCOMPATIBLE_CLASS = DiagnosticFactory2.create(ERROR);
//Elements with "INVISIBLE_REFERENCE" error are marked as unresolved, unlike elements with "INVISIBLE_MEMBER" error
//"INVISIBLE_REFERENCE" is used for invisible classes references and references in import
DiagnosticFactory3 INVISIBLE_REFERENCE =
DiagnosticFactory3.create(ERROR);
DiagnosticFactory3 INVISIBLE_MEMBER =
DiagnosticFactory3.create(ERROR, CALL_ELEMENT);
DiagnosticFactory1 DEPRECATED_ACCESS_BY_SHORT_NAME = DiagnosticFactory1.create(WARNING);
DiagnosticFactory1 DEPRECATED_ACCESS_TO_ENUM_COMPANION_PROPERTY = DiagnosticFactory1.create(WARNING);
DiagnosticFactory0 DEPRECATED_ACCESS_TO_ENUM_ENTRY_COMPANION_PROPERTY = DiagnosticFactory0.create(WARNING);
DiagnosticFactory0 DEPRECATED_ACCESS_TO_ENTRY_PROPERTY_FROM_ENUM = DiagnosticFactory0.create(WARNING);
DiagnosticFactory0 DEPRECATED_ACCESS_TO_ENUM_ENTRY_PROPERTY_AS_REFERENCE = DiagnosticFactory0.create(WARNING);
DiagnosticFactory0 DEPRECATED_DECLARATION_OF_ENUM_ENTRY = DiagnosticFactory0.create(WARNING);
DiagnosticFactory2 DEPRECATED_RESOLVE_WITH_AMBIGUOUS_ENUM_ENTRY = DiagnosticFactory2.create(WARNING);
DiagnosticFactory1 PROTECTED_CONSTRUCTOR_NOT_IN_SUPER_CALL = DiagnosticFactory1.create(ERROR);
// Exposed visibility group
DiagnosticFactory3 EXPOSED_PROPERTY_TYPE =
DiagnosticFactory3.create(ERROR);
DiagnosticFactoryForDeprecation3
EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR =
DiagnosticFactoryForDeprecation3.create(LanguageFeature.ForbidExposingTypesInPrimaryConstructorProperties);
DiagnosticFactory3 EXPOSED_FUNCTION_RETURN_TYPE =
DiagnosticFactory3.create(ERROR);
DiagnosticFactory3 EXPOSED_PARAMETER_TYPE =
DiagnosticFactory3.create(ERROR);
DiagnosticFactory3 EXPOSED_RECEIVER_TYPE =
DiagnosticFactory3.create(ERROR);
DiagnosticFactory3 EXPOSED_TYPE_PARAMETER_BOUND =
DiagnosticFactory3.create(ERROR);
DiagnosticFactory3 EXPOSED_SUPER_CLASS =
DiagnosticFactory3.create(ERROR);
DiagnosticFactory3 EXPOSED_SUPER_INTERFACE =
DiagnosticFactory3.create(ERROR);
DiagnosticFactory3 EXPOSED_TYPEALIAS_EXPANDED_TYPE =
DiagnosticFactory3.create(ERROR);
DiagnosticFactory3 EXPOSED_FROM_PRIVATE_IN_FILE =
DiagnosticFactory3.create(WARNING);
DiagnosticFactory2> INACCESSIBLE_TYPE = DiagnosticFactory2.create(WARNING);
DiagnosticFactory1> PLATFORM_CLASS_MAPPED_TO_KOTLIN = DiagnosticFactory1.create(WARNING);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Errors/warnings in types
// Note: class/interface declaration is NOT a type. A type is something that may be written on the right-hand side of ":"
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DiagnosticFactory0 PROJECTION_ON_NON_CLASS_TYPE_ARGUMENT = DiagnosticFactory0.create(ERROR, VARIANCE_IN_PROJECTION);
DiagnosticFactory2 UPPER_BOUND_VIOLATED = DiagnosticFactory2.create(ERROR);
DiagnosticFactory2 UPPER_BOUND_VIOLATED_WARNING = DiagnosticFactory2.create(WARNING);
DiagnosticFactory0 REDUNDANT_NULLABLE = DiagnosticFactory0.create(WARNING, NULLABLE_TYPE);
DiagnosticFactory0 NULLABLE_ON_DEFINITELY_NOT_NULLABLE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 INCORRECT_LEFT_COMPONENT_OF_INTERSECTION = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 INCORRECT_RIGHT_COMPONENT_OF_INTERSECTION = DiagnosticFactory0.create(ERROR);
DiagnosticFactory2 WRONG_NUMBER_OF_TYPE_ARGUMENTS = DiagnosticFactory2.create(ERROR);
DiagnosticFactory1 OUTER_CLASS_ARGUMENTS_REQUIRED = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 TYPE_ARGUMENTS_NOT_ALLOWED = DiagnosticFactory1.create(ERROR);
DiagnosticFactory2 NO_TYPE_ARGUMENTS_ON_RHS = DiagnosticFactory2.create(ERROR);
DiagnosticFactory1 CONFLICTING_PROJECTION =
DiagnosticFactory1.create(ERROR, VARIANCE_IN_PROJECTION);
DiagnosticFactory1 REDUNDANT_PROJECTION =
DiagnosticFactory1.create(WARNING, VARIANCE_IN_PROJECTION);
DiagnosticFactoryForDeprecation1 TYPE_VARIANCE_CONFLICT =
DiagnosticFactoryForDeprecation1.create(LanguageFeature.ReportTypeVarianceConflictOnQualifierArguments, DECLARATION_SIGNATURE_OR_DEFAULT);
DiagnosticFactory1 TYPE_VARIANCE_CONFLICT_IN_EXPANDED_TYPE =
DiagnosticFactory1.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
DiagnosticFactory0 FINITE_BOUNDS_VIOLATION = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 FINITE_BOUNDS_VIOLATION_IN_JAVA = DiagnosticFactory1.create(WARNING);
DiagnosticFactory0 EXPANSIVE_INHERITANCE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 EXPANSIVE_INHERITANCE_IN_JAVA = DiagnosticFactory1.create(WARNING);
DiagnosticFactory0 TYPE_ARGUMENTS_FOR_OUTER_CLASS_WHEN_NESTED_REFERENCED = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 REIFIED_TYPE_IN_CATCH_CLAUSE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 TYPE_PARAMETER_IN_CATCH_CLAUSE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 GENERIC_THROWABLE_SUBCLASS = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 INNER_CLASS_OF_GENERIC_THROWABLE_SUBCLASS =
DiagnosticFactory0.create(ERROR, DECLARATION_NAME);
DiagnosticFactory0 INNER_CLASS_OF_GENERIC_THROWABLE_SUBCLASS_WARNING =
DiagnosticFactory0.create(WARNING, DECLARATION_NAME);
DiagnosticFactory0 TOPLEVEL_TYPEALIASES_ONLY = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 RECURSIVE_TYPEALIAS_EXPANSION = DiagnosticFactory1.create(ERROR);
DiagnosticFactory3 UPPER_BOUND_VIOLATED_IN_TYPEALIAS_EXPANSION =
DiagnosticFactory3.create(ERROR);
DiagnosticFactory3 UPPER_BOUND_VIOLATED_IN_TYPEALIAS_EXPANSION_WARNING =
DiagnosticFactory3.create(WARNING);
DiagnosticFactory1 CONFLICTING_PROJECTION_IN_TYPEALIAS_EXPANSION = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 TYPEALIAS_SHOULD_EXPAND_TO_CLASS = DiagnosticFactory1.create(ERROR);
DiagnosticFactory2 TYPEALIAS_EXPANDED_TO_MALFORMED_TYPE = DiagnosticFactory2.create(ERROR);
DiagnosticFactory1 EXPANDED_TYPE_CANNOT_BE_CONSTRUCTED = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 EXPANDED_TYPE_CANNOT_BE_INHERITED = DiagnosticFactory1.create(ERROR);
DiagnosticFactory0 DEPRECATED_SYNTAX_WITH_DEFINITELY_NOT_NULL = DiagnosticFactory0.create(WARNING);
DiagnosticFactory0 MODIFIER_LIST_NOT_ALLOWED = DiagnosticFactory0.create(ERROR);
DiagnosticFactoryForDeprecation1 PROGRESSIONS_CHANGING_RESOLVE = DiagnosticFactoryForDeprecation1.create(LanguageFeature.ProgressionsChangingResolve);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Errors in declarations
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Imports
DiagnosticFactory1 CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 CANNOT_BE_IMPORTED = DiagnosticFactory1.create(ERROR);
DiagnosticFactory0 PACKAGE_CANNOT_BE_IMPORTED = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 CONFLICTING_IMPORT = DiagnosticFactory1.create(ERROR, PositioningStrategies.IMPORT_ALIAS);
DiagnosticFactory0 OPERATOR_RENAMED_ON_IMPORT = DiagnosticFactory0.create(ERROR);
// Modifiers
DiagnosticFactory2 INCOMPATIBLE_MODIFIERS =
DiagnosticFactory2.create(ERROR);
DiagnosticFactory2 DEPRECATED_MODIFIER_PAIR =
DiagnosticFactory2.create(WARNING);
DiagnosticFactory1 REPEATED_MODIFIER = DiagnosticFactory1.create(ERROR);
DiagnosticFactory2 REDUNDANT_MODIFIER = DiagnosticFactory2.create(WARNING);
DiagnosticFactory2 WRONG_MODIFIER_TARGET = DiagnosticFactory2.create(ERROR);
DiagnosticFactory2 DEPRECATED_MODIFIER_FOR_TARGET = DiagnosticFactory2.create(WARNING);
DiagnosticFactory2 DEPRECATED_MODIFIER = DiagnosticFactory2.create(WARNING);
DiagnosticFactory2 REDUNDANT_MODIFIER_FOR_TARGET = DiagnosticFactory2.create(WARNING);
DiagnosticFactory0 NO_EXPLICIT_VISIBILITY_IN_API_MODE = DiagnosticFactory0.create(ERROR, DECLARATION_START_TO_NAME);
DiagnosticFactory0 NO_EXPLICIT_RETURN_TYPE_IN_API_MODE = DiagnosticFactory0.create(ERROR, DECLARATION_NAME);
DiagnosticFactory0 NO_EXPLICIT_VISIBILITY_IN_API_MODE_WARNING = DiagnosticFactory0.create(WARNING,
DECLARATION_START_TO_NAME);
DiagnosticFactory0 NO_EXPLICIT_RETURN_TYPE_IN_API_MODE_WARNING =
DiagnosticFactory0.create(WARNING, DECLARATION_NAME);
DiagnosticFactory2 WRONG_MODIFIER_CONTAINING_DECLARATION = DiagnosticFactory2.create(ERROR);
DiagnosticFactory2 DEPRECATED_MODIFIER_CONTAINING_DECLARATION =
DiagnosticFactory2.create(WARNING);
DiagnosticFactory1 ILLEGAL_INLINE_PARAMETER_MODIFIER = DiagnosticFactory1.create(ERROR);
DiagnosticFactory0 INLINE_SUSPEND_FUNCTION_TYPE_UNSUPPORTED = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 REDUNDANT_INLINE_SUSPEND_FUNCTION_TYPE = DiagnosticFactory0.create(WARNING);
DiagnosticFactory1 WRONG_ANNOTATION_TARGET = DiagnosticFactory1.create(ERROR);
DiagnosticFactory2 WRONG_ANNOTATION_TARGET_WITH_USE_SITE_TARGET = DiagnosticFactory2.create(ERROR);
DiagnosticFactory1 WRONG_ANNOTATION_TARGET_WITH_USE_SITE_TARGET_ON_TYPE = DiagnosticFactory1.create(WARNING);
DiagnosticFactory0 REPEATED_ANNOTATION = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 REPEATED_ANNOTATION_WARNING = DiagnosticFactory0.create(WARNING);
DiagnosticFactory0 NON_SOURCE_ANNOTATION_ON_INLINED_LAMBDA_EXPRESSION = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 WRONG_EXTENSION_FUNCTION_TYPE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 WRONG_EXTENSION_FUNCTION_TYPE_WARNING = DiagnosticFactory0.create(WARNING);
// Annotations
DiagnosticFactory0 SUPERTYPES_FOR_ANNOTATION_CLASS = DiagnosticFactory0.create(ERROR);
DiagnosticFactoryForDeprecation0 ANNOTATION_ON_SUPERCLASS =
DiagnosticFactoryForDeprecation0.create(LanguageFeature.ProhibitUseSiteTargetAnnotationsOnSuperTypes);
DiagnosticFactory0 MISSING_VAL_ON_ANNOTATION_PARAMETER = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 VAR_ANNOTATION_PARAMETER = DiagnosticFactory0.create(ERROR, VAL_OR_VAR_NODE);
DiagnosticFactory0 ANNOTATION_CLASS_CONSTRUCTOR_CALL = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 NOT_AN_ANNOTATION_CLASS = DiagnosticFactory1.create(ERROR);
DiagnosticFactory0 ANNOTATION_CLASS_MEMBER = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 INVALID_TYPE_OF_ANNOTATION_MEMBER = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 NULLABLE_TYPE_OF_ANNOTATION_MEMBER = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 ANNOTATION_ARGUMENT_MUST_BE_CONST = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 ANNOTATION_ARGUMENT_MUST_BE_KCLASS_LITERAL = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 ANNOTATION_ARGUMENT_MUST_BE_ENUM_CONST = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 ANNOTATION_ARGUMENT_KCLASS_LITERAL_OF_TYPE_PARAMETER = DiagnosticFactory0.create(WARNING);
DiagnosticFactory0 ANNOTATION_ARGUMENT_KCLASS_LITERAL_OF_TYPE_PARAMETER_ERROR = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 ANNOTATION_PARAMETER_DEFAULT_VALUE_MUST_BE_CONSTANT = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 ANNOTATIONS_ON_BLOCK_LEVEL_EXPRESSION_ON_THE_SAME_LINE = DiagnosticFactory0.create(WARNING);
DiagnosticFactory0 ANNOTATION_USED_AS_ANNOTATION_ARGUMENT = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 ANNOTATION_ARGUMENT_IS_NON_CONST = DiagnosticFactory0.create(WARNING);
DiagnosticFactoryForDeprecation0 CYCLE_IN_ANNOTATION_PARAMETER = DiagnosticFactoryForDeprecation0.create(LanguageFeature.ProhibitCyclesInAnnotations);
DiagnosticFactoryForDeprecation0 RESTRICTED_RETENTION_FOR_EXPRESSION_ANNOTATION =
DiagnosticFactoryForDeprecation0.create(LanguageFeature.RestrictRetentionForExpressionAnnotations);
DiagnosticFactoryForDeprecation0 LOCAL_ANNOTATION_CLASS =
DiagnosticFactoryForDeprecation0.create(LanguageFeature.ProhibitLocalAnnotations);
DiagnosticFactory1 ILLEGAL_KOTLIN_VERSION_STRING_VALUE = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 NEWER_VERSION_IN_SINCE_KOTLIN = DiagnosticFactory1.create(WARNING);
DiagnosticFactory2 OPT_IN_USAGE = DiagnosticFactory2.create(WARNING);
DiagnosticFactory2 OPT_IN_USAGE_ERROR = DiagnosticFactory2.create(ERROR);
DiagnosticFactory2 OPT_IN_USAGE_FUTURE_ERROR = DiagnosticFactory2.create(WARNING);
DiagnosticFactory2 OPT_IN_OVERRIDE = DiagnosticFactory2.create(WARNING);
DiagnosticFactory2 OPT_IN_OVERRIDE_ERROR = DiagnosticFactory2.create(ERROR);
DiagnosticFactory0 OPT_IN_IS_NOT_ENABLED = DiagnosticFactory0.create(WARNING);
DiagnosticFactory0 OPT_IN_CAN_ONLY_BE_USED_AS_ANNOTATION = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0
OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 OPT_IN_WITHOUT_ARGUMENTS = DiagnosticFactory0.create(WARNING);
DiagnosticFactory1 OPT_IN_ARGUMENT_IS_NOT_MARKER = DiagnosticFactory1.create(WARNING);
DiagnosticFactory1 OPT_IN_MARKER_WITH_WRONG_TARGET = DiagnosticFactory1.create(ERROR);
DiagnosticFactory0 OPT_IN_MARKER_WITH_WRONG_RETENTION = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 OPT_IN_MARKER_ON_WRONG_TARGET = DiagnosticFactory1.create(ERROR);
DiagnosticFactory0 OPT_IN_MARKER_ON_OVERRIDE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 OPT_IN_MARKER_ON_OVERRIDE_WARNING = DiagnosticFactory0.create(WARNING);
DiagnosticFactory1 SUBCLASS_OPT_IN_INAPPLICABLE = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 EXPERIMENTAL_UNSIGNED_LITERALS = DiagnosticFactory1.create(WARNING);
DiagnosticFactory1 EXPERIMENTAL_UNSIGNED_LITERALS_ERROR = DiagnosticFactory1.create(ERROR);
DiagnosticFactory0 NON_PARENTHESIZED_ANNOTATIONS_ON_FUNCTIONAL_TYPES = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 ANNOTATION_IN_WHERE_CLAUSE_WARNING = DiagnosticFactory0.create(WARNING);
// Const
DiagnosticFactory0 CONST_VAL_NOT_TOP_LEVEL_OR_OBJECT = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 CONST_VAL_WITH_GETTER = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 CONST_VAL_WITH_DELEGATE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 TYPE_CANT_BE_USED_FOR_CONST_VAL = DiagnosticFactory1.create(ERROR);
DiagnosticFactory0 CONST_VAL_WITHOUT_INITIALIZER = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 CONST_VAL_WITH_NON_CONST_INITIALIZER = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 INAPPLICABLE_TARGET_ON_PROPERTY = DiagnosticFactory1.create(ERROR);
DiagnosticFactory1 INAPPLICABLE_TARGET_ON_PROPERTY_WARNING = DiagnosticFactory1.create(WARNING);
DiagnosticFactory1 INAPPLICABLE_TARGET_PROPERTY_IMMUTABLE = DiagnosticFactory1.create(ERROR);
DiagnosticFactory0 INAPPLICABLE_TARGET_PROPERTY_HAS_NO_DELEGATE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 INAPPLICABLE_TARGET_PROPERTY_HAS_NO_BACKING_FIELD = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 INAPPLICABLE_PARAM_TARGET = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 REDUNDANT_ANNOTATION_TARGET = DiagnosticFactory1.create(WARNING);
DiagnosticFactory0 INAPPLICABLE_FILE_TARGET = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 VOLATILE_ON_VALUE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 VOLATILE_ON_DELEGATE = DiagnosticFactory0.create(ERROR);
// Classes and interfaces
DiagnosticFactory0 PROJECTION_IN_IMMEDIATE_ARGUMENT_TO_SUPERTYPE =
DiagnosticFactory0.create(ERROR, VARIANCE_IN_PROJECTION);
DiagnosticFactory0 CYCLIC_INHERITANCE_HIERARCHY = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 CYCLIC_SCOPES_WITH_COMPANION = DiagnosticFactory0.create(WARNING);
DiagnosticFactory0 SUPERTYPE_NOT_INITIALIZED = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 DELEGATION_NOT_TO_INTERFACE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory2>
DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE =
DiagnosticFactory2.create(WARNING, DECLARATION_NAME);
DiagnosticFactory0 SUPERTYPE_NOT_A_CLASS_OR_INTERFACE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 SUPERTYPE_IS_SUSPEND_EXTENSION_FUNCTION_TYPE = DiagnosticFactory0.create(WARNING);
DiagnosticFactory0 SUPERTYPE_IS_SUSPEND_FUNCTION_TYPE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 SUPERTYPE_IS_KSUSPEND_FUNCTION_TYPE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 MIXING_SUSPEND_AND_NON_SUSPEND_SUPERTYPES = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 MANY_CLASSES_IN_SUPERTYPE_LIST = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 SUPERTYPE_APPEARS_TWICE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory3>
INCONSISTENT_TYPE_PARAMETER_VALUES = DiagnosticFactory3.create(ERROR);
DiagnosticFactory3>
INCONSISTENT_TYPE_PARAMETER_BOUNDS = DiagnosticFactory3.create(ERROR);
DiagnosticFactory0 FINAL_SUPERTYPE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 DATA_CLASS_CANNOT_HAVE_CLASS_SUPERTYPES = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 SINGLETON_IN_SUPERTYPE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 NULLABLE_SUPERTYPE = DiagnosticFactory0.create(ERROR, NULLABLE_TYPE);
DiagnosticFactory0 DYNAMIC_SUPERTYPE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 CLASS_CANNOT_BE_EXTENDED_DIRECTLY = DiagnosticFactory1.create(ERROR);
DiagnosticFactory0 MISSING_CONSTRUCTOR_KEYWORD = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 MISSING_CONSTRUCTOR_BRACKETS = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 NON_PRIVATE_CONSTRUCTOR_IN_ENUM = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 NON_PRIVATE_CONSTRUCTOR_IN_SEALED = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 NON_PRIVATE_OR_PROTECTED_CONSTRUCTOR_IN_SEALED = DiagnosticFactory0.create(ERROR);
// Inline classes, Value classes
DiagnosticFactory0 VALUE_CLASS_NOT_TOP_LEVEL = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 VALUE_CLASS_NOT_FINAL = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 ABSENCE_OF_PRIMARY_CONSTRUCTOR_FOR_VALUE_CLASS = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 INLINE_CLASS_CONSTRUCTOR_WRONG_PARAMETERS_SIZE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 VALUE_CLASS_EMPTY_CONSTRUCTOR = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 VALUE_CLASS_CONSTRUCTOR_NOT_FINAL_READ_ONLY_PARAMETER = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 PROPERTY_WITH_BACKING_FIELD_INSIDE_VALUE_CLASS = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
DiagnosticFactory0 DELEGATED_PROPERTY_INSIDE_VALUE_CLASS = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 VALUE_CLASS_HAS_INAPPLICABLE_PARAMETER_TYPE = DiagnosticFactory1.create(ERROR);
DiagnosticFactory0 VALUE_CLASS_CANNOT_IMPLEMENT_INTERFACE_BY_DELEGATION = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 VALUE_CLASS_CANNOT_EXTEND_CLASSES = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 VALUE_CLASS_CANNOT_BE_RECURSIVE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 MULTI_FIELD_VALUE_CLASS_PRIMARY_CONSTRUCTOR_DEFAULT_PARAMETER = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 RESERVED_MEMBER_INSIDE_VALUE_CLASS = DiagnosticFactory1.create(ERROR);
DiagnosticFactory0 TYPE_ARGUMENT_ON_TYPED_VALUE_CLASS_EQUALS = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 INNER_CLASS_INSIDE_VALUE_CLASS = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 VALUE_CLASS_CANNOT_BE_CLONEABLE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 INLINE_CLASS_DEPRECATED = DiagnosticFactory0.create(WARNING);
DiagnosticFactory0 VALUE_CLASS_CANNOT_HAVE_CONTEXT_RECEIVERS = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 INEFFICIENT_EQUALS_OVERRIDING_IN_VALUE_CLASS =
DiagnosticFactory1.create(WARNING, DECLARATION_NAME);
DiagnosticFactory1 ANNOTATION_ON_ILLEGAL_MULTI_FIELD_VALUE_CLASS_TYPED_TARGET =
DiagnosticFactory1.create(ERROR);
// Result class
DiagnosticFactory0 RESULT_CLASS_IN_RETURN_TYPE = DiagnosticFactory0.create(ERROR);
DiagnosticFactory1 RESULT_CLASS_WITH_NULLABLE_OPERATOR = DiagnosticFactory1.create(ERROR);
// Fun interfaces
DiagnosticFactory0 FUN_INTERFACE_WRONG_COUNT_OF_ABSTRACT_MEMBERS = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0 FUN_INTERFACE_CANNOT_HAVE_ABSTRACT_PROPERTIES = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0