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

org.jetbrains.kotlin.fir.analysis.checkers.CommonExpressionCheckers.kt Maven / Gradle / Ivy

There is a newer version: 2.1.0-RC
Show newest version
/*
 * Copyright 2010-2021 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.fir.analysis.checkers

import org.jetbrains.kotlin.fir.analysis.checkers.expression.*
import org.jetbrains.kotlin.fir.analysis.checkers.syntax.*

object CommonExpressionCheckers : ExpressionCheckers() {
    override val annotationCallCheckers: Set
        get() = setOf(
            FirAnnotationExpressionChecker,
            FirOptInAnnotationCallChecker,
        )

    override val basicExpressionCheckers: Set
        get() = setOf(
            FirUnderscoreChecker,
            FirExpressionAnnotationChecker,
            FirDeprecationChecker,
            FirRecursiveProblemChecker,
            FirOptInUsageAccessChecker,
            FirPrefixAndSuffixSyntaxChecker,
        )

    override val throwExpressionCheckers: Set
        get() = setOf(
            FirThrowExpressionTypeChecker,
        )

    override val qualifiedAccessExpressionCheckers: Set
        get() = setOf(
            FirCallableReferenceChecker,
            FirSuperReferenceChecker,
            FirSuperclassNotAccessibleFromInterfaceChecker,
            FirAbstractSuperCallChecker,
            FirQualifiedSupertypeExtendedByOtherSupertypeChecker,
            FirProjectionsOnNonClassTypeArgumentChecker,
            FirIncompatibleProjectionsOnTypeArgumentChecker,
            FirUpperBoundViolatedExpressionChecker,
            FirTypeArgumentsNotAllowedExpressionChecker,
            FirTypeParameterInQualifiedAccessChecker,
            FirSealedClassConstructorCallChecker,
            FirUninitializedEnumChecker,
            FirFunInterfaceConstructorReferenceChecker,
            FirReifiedChecker,
            FirSuspendCallChecker,
            FirLateinitIntrinsicApplicabilityChecker,
            FirAbstractClassInstantiationChecker,
            FirInlineBodyQualifiedAccessExpressionChecker,
            FirIncompatibleClassExpressionChecker,
            FirMissingDependencyClassChecker,
            FirMissingDependencySupertypeInQualifiedAccessExpressionsChecker,
            FirArrayOfNothingQualifierChecker,
            FirPrivateToThisAccessChecker,
        )

    override val callCheckers: Set
        get() = setOf(
            FirNamedVarargChecker,
        )

    override val functionCallCheckers: Set
        get() = setOf(
            FirConventionFunctionCallChecker,
            FirDivisionByZeroChecker,
            FirConstructorCallChecker,
            FirSpreadOfNullableChecker,
            FirAssignmentOperatorCallChecker,
            FirNamedVarargChecker,
            FirUnderscoredTypeArgumentSyntaxChecker,
            FirContractNotFirstStatementChecker,
            FirProtectedConstructorNotInSuperCallChecker,
            FirOptionalExpectationExpressionChecker
        )

    override val propertyAccessExpressionCheckers: Set
        get() = setOf(
            FirPropertyAccessTypeArgumentsChecker,
            FirCustomEnumEntriesMigrationAccessChecker,
        )

    override val tryExpressionCheckers: Set
        get() = setOf(
            FirCatchParameterChecker
        )

    override val variableAssignmentCheckers: Set
        get() = setOf(
            FirReassignmentAndInvisibleSetterChecker,
            FirAssignmentTypeMismatchChecker,
            FirInlineBodyVariableAssignmentChecker,
        )

    override val whenExpressionCheckers: Set
        get() = setOf(
            FirExhaustiveWhenChecker,
            FirWhenConditionChecker,
            FirWhenSubjectChecker,
            FirCommaInWhenConditionChecker,
            FirConfusingWhenBranchSyntaxChecker,
        )

    override val loopExpressionCheckers: Set
        get() = setOf(
            FirLoopConditionChecker,
            FirForLoopStatementAssignmentChecker
        )

    override val loopJumpCheckers: Set
        get() = setOf(
            FirBreakOrContinueJumpsAcrossFunctionBoundaryChecker
        )

    override val logicExpressionCheckers: Set
        get() = setOf(
            FirLogicExpressionTypeChecker,
        )

    override val returnExpressionCheckers: Set
        get() = setOf(
            FirReturnSyntaxAndLabelChecker,
            FirFunctionReturnTypeMismatchChecker
        )

    override val blockCheckers: Set
        get() = setOf(
            FirForLoopChecker,
            FirConflictsExpressionChecker,
            FirSingleNamedFunctionChecker,
        )

    override val checkNotNullCallCheckers: Set
        get() = setOf(
            FirNotNullAssertionChecker,
        )

    override val elvisExpressionCheckers: Set
        get() = setOf(
            FirUselessElvisChecker,
        )

    override val getClassCallCheckers: Set
        get() = setOf(
            FirClassLiteralChecker,
        )

    override val safeCallExpressionCheckers: Set
        get() = setOf(
            FirUnnecessarySafeCallChecker,
        )

    override val typeOperatorCallCheckers: Set
        get() = setOf(
            FirCastOperatorsChecker
        )

    override val resolvedQualifierCheckers: Set
        get() = setOf(
            FirStandaloneQualifierChecker,
            FirPackageOnLhsQualifierChecker,
            FirOptInUsageQualifierChecker,
            FirDeprecatedQualifierChecker,
            FirVisibilityQualifierChecker,
            FirInlineBodyResolvedQualifierChecker,
            FirCustomEnumEntriesMigrationQualifierChecker,
        )

    override val equalityOperatorCallCheckers: Set
        get() = setOf(
            FirEqualityCompatibilityChecker,
        )

    override val arrayLiteralCheckers: Set
        get() = setOf(
            FirUnsupportedArrayLiteralChecker
        )

    override val inaccessibleReceiverCheckers: Set
        get() = setOf(
            FirReceiverAccessBeforeSuperCallChecker,
        )

    override val callableReferenceAccessCheckers: Set
        get() = setOf(
            FirTypeArgumentsOfQualifierOfCallableReferenceChecker,
            FirCustomEnumEntriesMigrationReferenceChecker,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy