All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.kotlin.kotlin-compiler.1.3.11.source-code.ErrorsJs Maven / Gradle / Ivy

There is a newer version: 2.1.0-Beta1
Show newest version
/*
 * Copyright 2010-2018 JetBrains s.r.o. 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.js.resolve.diagnostics;

import com.intellij.psi.PsiElement;
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor;
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor;
import org.jetbrains.kotlin.descriptors.FunctionDescriptor;
import org.jetbrains.kotlin.diagnostics.*;
import org.jetbrains.kotlin.psi.*;
import org.jetbrains.kotlin.types.KotlinType;

import static org.jetbrains.kotlin.diagnostics.PositioningStrategies.*;
import static org.jetbrains.kotlin.diagnostics.Severity.ERROR;
import static org.jetbrains.kotlin.diagnostics.Severity.WARNING;

public interface ErrorsJs {
    DiagnosticFactory1 NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN = DiagnosticFactory1.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory1 NATIVE_INDEXER_KEY_SHOULD_BE_STRING_OR_NUMBER = DiagnosticFactory1.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory1 NATIVE_INDEXER_CAN_NOT_HAVE_DEFAULT_ARGUMENTS = DiagnosticFactory1.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 NATIVE_GETTER_RETURN_TYPE_SHOULD_BE_NULLABLE = DiagnosticFactory0.create(ERROR, DECLARATION_RETURN_TYPE);
    DiagnosticFactory0 NATIVE_SETTER_WRONG_RETURN_TYPE = DiagnosticFactory0.create(ERROR, DECLARATION_RETURN_TYPE);
    DiagnosticFactory2 NATIVE_INDEXER_WRONG_PARAMETER_COUNT = DiagnosticFactory2.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory1 JSCODE_ERROR = DiagnosticFactory1.create(ERROR, JsCodePositioningStrategy.INSTANCE);
    DiagnosticFactory1 JSCODE_WARNING = DiagnosticFactory1.create(WARNING, JsCodePositioningStrategy.INSTANCE);
    DiagnosticFactory0 JSCODE_ARGUMENT_SHOULD_BE_CONSTANT = DiagnosticFactory0.create(ERROR, DEFAULT);
    DiagnosticFactory1 NOT_SUPPORTED = DiagnosticFactory1.create(ERROR, DEFAULT);
    DiagnosticFactory0 JSCODE_NO_JAVASCRIPT_PRODUCED = DiagnosticFactory0.create(ERROR, DEFAULT);
    DiagnosticFactory1 WRONG_EXTERNAL_DECLARATION = DiagnosticFactory1.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 EXTENSION_FUNCTION_IN_EXTERNAL_DECLARATION = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 NESTED_EXTERNAL_DECLARATION = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 INLINE_CLASS_IN_EXTERNAL_DECLARATION = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);

    DiagnosticFactory2 JS_NAME_CLASH = DiagnosticFactory2.create(
            ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory3 JS_FAKE_NAME_CLASH =
            DiagnosticFactory3.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory1 JS_BUILTIN_NAME_CLASH = DiagnosticFactory1.create(
            ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 JS_NAME_ON_PRIMARY_CONSTRUCTOR_PROHIBITED = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 JS_NAME_ON_ACCESSOR_AND_PROPERTY = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 JS_NAME_IS_NOT_ON_ALL_ACCESSORS = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 JS_NAME_PROHIBITED_FOR_OVERRIDE = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 JS_NAME_PROHIBITED_FOR_EXTENSION_PROPERTY = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 JS_NAME_PROHIBITED_FOR_NAMED_NATIVE = DiagnosticFactory0.create(ERROR);

    DiagnosticFactory0 NAME_CONTAINS_ILLEGAL_CHARS = DiagnosticFactory0.create(
            ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);

    DiagnosticFactory0 JS_MODULE_PROHIBITED_ON_VAR = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 JS_MODULE_PROHIBITED_ON_NON_NATIVE = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 NESTED_JS_MODULE_PROHIBITED = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory1 CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM =
            DiagnosticFactory1.create(ERROR, DEFAULT);
    DiagnosticFactory1 CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM =
            DiagnosticFactory1.create(ERROR, DEFAULT);
    DiagnosticFactory0 CALL_FROM_UMD_MUST_BE_JS_MODULE_AND_JS_NON_MODULE = DiagnosticFactory0.create(ERROR, DEFAULT);

    DiagnosticFactory1 NON_EXTERNAL_DECLARATION_IN_INAPPROPRIATE_FILE =
            DiagnosticFactory1.create(ERROR, PositioningStrategies.DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 WRONG_JS_QUALIFIER = DiagnosticFactory0.create(ERROR, PositioningStrategies.DEFAULT);

    DiagnosticFactory1 CANNOT_CHECK_FOR_EXTERNAL_INTERFACE = DiagnosticFactory1.create(ERROR);
    DiagnosticFactory2 UNCHECKED_CAST_TO_EXTERNAL_INTERFACE = DiagnosticFactory2.create(WARNING);
    DiagnosticFactory1 EXTERNAL_INTERFACE_AS_REIFIED_TYPE_ARGUMENT = DiagnosticFactory1.create(ERROR);
    DiagnosticFactory0 EXTERNAL_INTERFACE_AS_CLASS_LITERAL = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 EXTERNAL_TYPE_EXTENDS_NON_EXTERNAL_TYPE = DiagnosticFactory0.create(
            ERROR, PositioningStrategies.DECLARATION_SIGNATURE_OR_DEFAULT);

    DiagnosticFactory1 WRONG_OPERATION_WITH_DYNAMIC = DiagnosticFactory1.create(ERROR);
    DiagnosticFactory0 SPREAD_OPERATOR_IN_DYNAMIC_CALL = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 DELEGATION_BY_DYNAMIC = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 PROPERTY_DELEGATION_BY_DYNAMIC = DiagnosticFactory0.create(ERROR);

    DiagnosticFactory0 RUNTIME_ANNOTATION_ON_EXTERNAL_DECLARATION = DiagnosticFactory0.create(
            ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 RUNTIME_ANNOTATION_NOT_SUPPORTED = DiagnosticFactory0.create(WARNING, DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 OVERRIDING_EXTERNAL_FUN_WITH_OPTIONAL_PARAMS =
            DiagnosticFactory0.create(ERROR, PositioningStrategies.DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory1 OVERRIDING_EXTERNAL_FUN_WITH_OPTIONAL_PARAMS_WITH_FAKE =
            DiagnosticFactory1.create(ERROR, PositioningStrategies.DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 IMPLEMENTING_FUNCTION_INTERFACE = DiagnosticFactory0.create(
            ERROR, PositioningStrategies.DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 INLINE_EXTERNAL_DECLARATION = DiagnosticFactory0.create(
            ERROR, PositioningStrategies.DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 NON_ABSTRACT_MEMBER_OF_EXTERNAL_INTERFACE = DiagnosticFactory0.create(
            ERROR, PositioningStrategies.DECLARATION_SIGNATURE_OR_DEFAULT);
    DiagnosticFactory0 NESTED_CLASS_IN_EXTERNAL_INTERFACE = DiagnosticFactory0.create(
            ERROR, PositioningStrategies.DECLARATION_SIGNATURE_OR_DEFAULT);

    // Diagnostics about exposing implementation detail in external declarations
    DiagnosticFactory0 WRONG_BODY_OF_EXTERNAL_DECLARATION = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 WRONG_INITIALIZER_OF_EXTERNAL_DECLARATION = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 WRONG_DEFAULT_VALUE_FOR_EXTERNAL_FUN_PARAMETER = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 EXTERNAL_DELEGATED_CONSTRUCTOR_CALL = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 EXTERNAL_DELEGATION = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 EXTERNAL_ANONYMOUS_INITIALIZER = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 EXTERNAL_ENUM_ENTRY_WITH_BODY = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 EXTERNAL_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER = DiagnosticFactory0.create(ERROR);
    DiagnosticFactory0 CALL_TO_DEFINED_EXTERNALLY_FROM_NON_EXTERNAL_DECLARATION = DiagnosticFactory0.create(ERROR);

    DiagnosticFactory1 WRONG_MULTIPLE_INHERITANCE =
            DiagnosticFactory1.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);

    @SuppressWarnings("UnusedDeclaration")
    Object _initializer = new Object() {
        {
            Errors.Initializer.initializeFactoryNames(ErrorsJs.class);
        }
    };
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy