Skip to content

Commit edeacd4

Browse files
cypressiousSpace Team
authored andcommitted
[FIR] Contextualize JVM checkers
1 parent 80146c8 commit edeacd4

24 files changed

+179
-211
lines changed

compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/jvm/FirJvmNamesChecker.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,24 @@ object FirJvmNamesChecker {
2222
private val DANGEROUS_CHARS = setOf('?', '*', '"', '|', '%')
2323

2424

25-
fun checkNameAndReport(name: Name, declarationSource: KtSourceElement?, context: CheckerContext, reporter: DiagnosticReporter) {
25+
context(context: CheckerContext, reporter: DiagnosticReporter)
26+
fun checkNameAndReport(
27+
name: Name,
28+
declarationSource: KtSourceElement?,
29+
) {
2630
if (declarationSource != null && declarationSource.kind !is KtFakeSourceElementKind && !name.isSpecial) {
2731
val nameString = name.asString()
2832
if (nameString.any { it in INVALID_CHARS }) {
2933
reporter.reportOn(
3034
declarationSource,
3135
FirErrors.INVALID_CHARACTERS,
32-
"contains illegal characters: ${INVALID_CHARS.intersect(nameString.toSet()).joinToString("")}",
33-
context
36+
"contains illegal characters: ${INVALID_CHARS.intersect(nameString.toSet()).joinToString("")}"
3437
)
3538
} else if (nameString.any { it in DANGEROUS_CHARS }) {
3639
reporter.reportOn(
3740
declarationSource,
3841
FirJvmErrors.DANGEROUS_CHARACTERS,
39-
DANGEROUS_CHARS.intersect(nameString.toSet()).joinToString(""),
40-
context
42+
DANGEROUS_CHARS.intersect(nameString.toSet()).joinToString("")
4143
)
4244
}
4345
}

compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/jvm/checkers/FirJvmInlineCheckerComponent.kt

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,35 @@ import org.jetbrains.kotlin.fir.symbols.impl.FirFunctionSymbol
1818
import org.jetbrains.kotlin.fir.symbols.impl.FirScriptSymbol
1919

2020
class FirJvmInlineCheckerComponent : FirInlineCheckerPlatformSpecificComponent() {
21-
override fun isGenerallyOk(declaration: FirDeclaration, context: CheckerContext, reporter: DiagnosticReporter): Boolean {
21+
context(context: CheckerContext, reporter: DiagnosticReporter)
22+
override fun isGenerallyOk(declaration: FirDeclaration): Boolean {
2223
// local inline functions are prohibited
2324
return if (declaration.isLocalMember && context.containingDeclarations.lastOrNull() !is FirScriptSymbol) {
24-
reporter.reportOn(declaration.source, FirJvmErrors.NOT_YET_SUPPORTED_LOCAL_INLINE_FUNCTION, context)
25+
reporter.reportOn(declaration.source, FirJvmErrors.NOT_YET_SUPPORTED_LOCAL_INLINE_FUNCTION)
2526
false
2627
} else {
2728
true
2829
}
2930
}
3031

32+
context(context: CheckerContext, reporter: DiagnosticReporter)
3133
override fun checkSuspendFunctionalParameterWithDefaultValue(
3234
param: FirValueParameter,
33-
context: CheckerContext,
34-
reporter: DiagnosticReporter,
3535
) {
3636
reporter.reportOn(
3737
param.source,
3838
FirErrors.NOT_YET_SUPPORTED_IN_INLINE,
39-
"Suspend functional parameters with default values",
40-
context
39+
"Suspend functional parameters with default values"
4140
)
4241
}
4342

43+
context(context: CheckerContext, reporter: DiagnosticReporter)
4444
override fun checkFunctionalParametersWithInheritedDefaultValues(
4545
function: FirSimpleFunction,
46-
context: CheckerContext,
47-
reporter: DiagnosticReporter,
4846
overriddenSymbols: List<FirCallableSymbol<FirCallableDeclaration>>,
4947
) {
5048
val paramsWithDefaults = overriddenSymbols.flatMap {
51-
if (it !is FirFunctionSymbol<*>) return@flatMap emptyList<Int>()
49+
if (it !is FirFunctionSymbol<*>) return@flatMap emptyList()
5250
it.valueParameterSymbols.mapIndexedNotNull { idx, param ->
5351
idx.takeIf { param.hasDefaultValue }
5452
}
@@ -58,8 +56,7 @@ class FirJvmInlineCheckerComponent : FirInlineCheckerPlatformSpecificComponent()
5856
reporter.reportOn(
5957
param.source,
6058
FirErrors.NOT_YET_SUPPORTED_IN_INLINE,
61-
"Functional parameters with inherited default values",
62-
context
59+
"Functional parameters with inherited default values"
6360
)
6461
}
6562
}

compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/jvm/checkers/declaration/FirDeclarationJavaNullabilityWarningCheckers.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,13 @@ package org.jetbrains.kotlin.fir.analysis.jvm.checkers.declaration
88
import org.jetbrains.kotlin.diagnostics.DiagnosticReporter
99
import org.jetbrains.kotlin.fir.analysis.checkers.MppCheckerKind
1010
import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext
11-
import org.jetbrains.kotlin.fir.analysis.checkers.declaration.FirFunctionChecker
1211
import org.jetbrains.kotlin.fir.analysis.checkers.declaration.FirPropertyChecker
1312
import org.jetbrains.kotlin.fir.analysis.checkers.declaration.FirValueParameterChecker
1413
import org.jetbrains.kotlin.fir.analysis.checkers.declaration.hasExplicitReturnType
1514
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors
1615
import org.jetbrains.kotlin.fir.analysis.jvm.checkers.expression.checkExpressionForEnhancedTypeMismatch
17-
import org.jetbrains.kotlin.fir.declarations.FirFunction
1816
import org.jetbrains.kotlin.fir.declarations.FirProperty
1917
import org.jetbrains.kotlin.fir.declarations.FirValueParameter
20-
import org.jetbrains.kotlin.fir.expressions.FirReturnExpression
21-
import org.jetbrains.kotlin.fir.expressions.impl.FirSingleExpressionBlock
2218
import org.jetbrains.kotlin.fir.types.coneType
2319

2420
object FirPropertyJavaNullabilityWarningChecker : FirPropertyChecker(MppCheckerKind.Common) {
@@ -27,8 +23,6 @@ object FirPropertyJavaNullabilityWarningChecker : FirPropertyChecker(MppCheckerK
2723
if (declaration.symbol.hasExplicitReturnType) {
2824
declaration.initializer?.checkExpressionForEnhancedTypeMismatch(
2925
declaration.returnTypeRef.coneType,
30-
reporter,
31-
context,
3226
FirJvmErrors.NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS,
3327
)
3428
}
@@ -40,8 +34,6 @@ object FirValueParameterJavaNullabilityWarningChecker : FirValueParameterChecker
4034
override fun check(declaration: FirValueParameter) {
4135
declaration.defaultValue?.checkExpressionForEnhancedTypeMismatch(
4236
declaration.returnTypeRef.coneType,
43-
reporter,
44-
context,
4537
FirJvmErrors.NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS,
4638
)
4739
}

compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/jvm/checkers/declaration/FirIncompatibleAnnotationsChecker.kt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ object FirIncompatibleAnnotationsChecker : FirClassChecker(MppCheckerKind.Common
2929
val javaTarget = declaration.getAnnotationByClassId(Java.Target, context.session) ?: return
3030
when (val kotlinTarget = declaration.getTargetAnnotation(context.session)) {
3131
null -> reporter.reportOn(javaTarget.source, FirJvmErrors.ANNOTATION_TARGETS_ONLY_IN_JAVA)
32-
else -> reportIncompatibleTargets(kotlinTarget, javaTarget, context, reporter)
32+
else -> reportIncompatibleTargets(kotlinTarget, javaTarget)
3333
}
3434
}
3535

36-
fun reportIncompatibleTargets(kotlinTarget: FirAnnotation, javaTarget: FirAnnotation, context: CheckerContext, reporter: DiagnosticReporter) {
36+
context(context: CheckerContext, reporter: DiagnosticReporter)
37+
fun reportIncompatibleTargets(
38+
kotlinTarget: FirAnnotation,
39+
javaTarget: FirAnnotation,
40+
) {
3741
val correspondingJavaTargets = kotlinTarget.extractArguments(StandardClassIds.Annotations.ParameterNames.targetAllowedTargets)
3842
.groupBy { KOTLIN_TO_JAVA_ANNOTATION_TARGETS[it] }.toMutableMap()
3943
// remove things which are included in the Java @Target annotation
@@ -45,8 +49,7 @@ object FirIncompatibleAnnotationsChecker : FirClassChecker(MppCheckerKind.Common
4549
javaTarget.source,
4650
FirJvmErrors.INCOMPATIBLE_ANNOTATION_TARGETS,
4751
correspondingJavaTargets.keys.filterNotNull(),
48-
correspondingJavaTargets.values.flatten(),
49-
context
52+
correspondingJavaTargets.values.flatten()
5053
)
5154
}
5255
}

compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/jvm/checkers/declaration/FirJvmExposeBoxedChecker.kt

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors
1818
import org.jetbrains.kotlin.fir.containingClassLookupTag
1919
import org.jetbrains.kotlin.fir.declarations.*
2020
import org.jetbrains.kotlin.fir.declarations.FirFunction
21-
import org.jetbrains.kotlin.fir.declarations.utils.isAbstract
2221
import org.jetbrains.kotlin.fir.declarations.utils.isFinal
2322
import org.jetbrains.kotlin.fir.declarations.utils.isInlineOrValue
2423
import org.jetbrains.kotlin.fir.declarations.utils.isInterface
25-
import org.jetbrains.kotlin.fir.declarations.utils.isOpen
2624
import org.jetbrains.kotlin.fir.declarations.utils.isSuspend
2725
import org.jetbrains.kotlin.fir.declarations.utils.nameOrSpecialName
2826
import org.jetbrains.kotlin.fir.expressions.FirAnnotation
@@ -43,87 +41,84 @@ object FirJvmExposeBoxedChecker : FirBasicDeclarationChecker(MppCheckerKind.Comm
4341
declaration.getAnnotationByClassId(JvmStandardClassIds.JVM_EXPOSE_BOXED_ANNOTATION_CLASS_ID, context.session)
4442

4543
if (jvmExposeBoxedAnnotation != null) {
46-
checkJvmExposeBoxedAnnotation(jvmExposeBoxedAnnotation, declaration, reporter, context)
44+
checkJvmExposeBoxedAnnotation(jvmExposeBoxedAnnotation, declaration)
4745
}
4846
}
4947

48+
context(reporter: DiagnosticReporter, context: CheckerContext)
5049
private fun checkJvmExposeBoxedAnnotation(
5150
jvmExposeBoxedAnnotation: FirAnnotation,
5251
declaration: FirDeclaration,
53-
reporter: DiagnosticReporter,
54-
context: CheckerContext,
5552
) {
5653
val name = jvmExposeBoxedAnnotation.findArgumentByName(JvmStandardClassIds.Annotations.ParameterNames.jvmExposeBoxedName)
5754

5855
if (name != null) {
5956
if (declaration.cannotRename()) {
60-
reporter.reportOn(name.source, FirJvmErrors.INAPPLICABLE_JVM_EXPOSE_BOXED_WITH_NAME, context)
57+
reporter.reportOn(name.source, FirJvmErrors.INAPPLICABLE_JVM_EXPOSE_BOXED_WITH_NAME)
6158
}
6259

6360
val value = name.evaluateAs<FirLiteralExpression>(context.session)?.value as? String
6461
if (value != null && !Name.isValidIdentifier(value)) {
65-
reporter.reportOn(name.source, FirJvmErrors.ILLEGAL_JVM_NAME, context)
62+
reporter.reportOn(name.source, FirJvmErrors.ILLEGAL_JVM_NAME)
6663
}
6764
}
6865

6966
if (declaration is FirClass && declaration.isInterface) {
70-
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_EXPOSE_OPEN_ABSTRACT, context)
67+
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_EXPOSE_OPEN_ABSTRACT)
7168
}
7269

7370
if (declaration is FirCallableDeclaration) {
7471
if (!declaration.isWithInlineClass(context.session)) {
75-
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.USELESS_JVM_EXPOSE_BOXED, context)
72+
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.USELESS_JVM_EXPOSE_BOXED)
7673
} else if (name == null && !declaration.isMangledOrWithResult(context.session)) {
7774
if (declaration is FirFunction) {
78-
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.JVM_EXPOSE_BOXED_REQUIRES_NAME, context)
75+
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.JVM_EXPOSE_BOXED_REQUIRES_NAME)
7976
}
8077
}
8178

8279
if (declaration.hasAnnotation(JvmStandardClassIds.JVM_SYNTHETIC_ANNOTATION_CLASS_ID, context.session)) {
83-
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_EXPOSE_SYNTHETIC, context)
80+
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_EXPOSE_SYNTHETIC)
8481
}
8582

8683
if (!declaration.isFinal && declaration.containingClassLookupTag()?.toRegularClassSymbol(context.session)?.isFinal == false) {
87-
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_EXPOSE_OPEN_ABSTRACT, context)
84+
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_EXPOSE_OPEN_ABSTRACT)
8885
}
8986

9087
if (!declaration.canBeOverloadedByExposed(context.session)) {
91-
checkJvmNameHasDifferentName(name, declaration, reporter, context)
88+
checkJvmNameHasDifferentName(name, declaration)
9289
}
9390

9491
if (declaration.propertyIfAccessor.typeParameters.any { it.symbol.isReified }) {
95-
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_EXPOSE_REIFIED, context)
92+
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_EXPOSE_REIFIED)
9693
}
9794

9895
if (declaration is FirFunction && declaration.isSuspend) {
99-
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_EXPOSE_SUSPEND, context)
96+
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_EXPOSE_SUSPEND)
10097
}
10198

10299
if (declaration.isLocalMember) {
103-
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_EXPOSE_LOCALS, context)
100+
reporter.reportOn(jvmExposeBoxedAnnotation.source, FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_EXPOSE_LOCALS)
104101
}
105102
}
106103
}
107104

105+
context(reporter: DiagnosticReporter, context: CheckerContext)
108106
private fun checkJvmNameHasDifferentName(
109107
name: FirExpression?,
110108
declaration: FirDeclaration,
111-
reporter: DiagnosticReporter,
112-
context: CheckerContext,
113109
) {
114110
if (name == null) return
115111
val value = name.evaluateAs<FirLiteralExpression>(context.session)?.value as? String ?: return
116112

117113
if (value == declaration.findJvmNameValue()) {
118114
reporter.reportOn(
119115
name.source,
120-
FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_BE_THE_SAME_AS_JVM_NAME,
121-
context
116+
FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_BE_THE_SAME_AS_JVM_NAME
122117
)
123118
}
124119

125120
if (declaration is FirFunction && declaration.nameOrSpecialName.asString() == value) {
126-
reporter.reportOn(name.source, FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_BE_THE_SAME, context)
121+
reporter.reportOn(name.source, FirJvmErrors.JVM_EXPOSE_BOXED_CANNOT_BE_THE_SAME)
127122
}
128123
}
129124

compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/jvm/checkers/declaration/FirJvmExternalDeclarationChecker.kt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,20 @@ object FirJvmExternalDeclarationChecker : FirBasicDeclarationChecker(MppCheckerK
2929
context(context: CheckerContext, reporter: DiagnosticReporter)
3030
override fun check(declaration: FirDeclaration) {
3131
if (declaration is FirPropertyAccessor) return
32-
checkInternal(declaration, null, null, context, reporter)
32+
checkInternal(declaration, null, null)
3333
}
3434

35+
context(context: CheckerContext, reporter: DiagnosticReporter)
3536
private fun checkInternal(
3637
declaration: FirDeclaration,
3738
reportSource: KtSourceElement?,
3839
modality: Modality?,
39-
context: CheckerContext,
40-
reporter: DiagnosticReporter
4140
) {
4241
if (declaration !is FirMemberDeclaration) return
4342

4443
if (declaration is FirProperty) {
4544
declaration.getter?.let {
46-
checkInternal(it, declaration.source, declaration.modality, context, reporter)
45+
checkInternal(it, declaration.source, declaration.modality)
4746
}
4847
}
4948

@@ -60,26 +59,26 @@ object FirJvmExternalDeclarationChecker : FirBasicDeclarationChecker(MppCheckerK
6059
}
6160
val externalModifier = declaration.getModifier(KtTokens.EXTERNAL_KEYWORD)
6261
externalModifier?.let {
63-
reporter.reportOn(it.source, FirErrors.WRONG_MODIFIER_TARGET, it.token, target, context)
62+
reporter.reportOn(it.source, FirErrors.WRONG_MODIFIER_TARGET, it.token, target)
6463
}
6564
return
6665
}
6766

6867
val containingClassSymbol = declaration.symbol.containingClassLookupTag()?.toRegularClassSymbol(context.session)
6968
if (containingClassSymbol != null) {
7069
if (containingClassSymbol.isInterface) {
71-
reporter.reportOn(declaration.source, FirJvmErrors.EXTERNAL_DECLARATION_IN_INTERFACE, context)
70+
reporter.reportOn(declaration.source, FirJvmErrors.EXTERNAL_DECLARATION_IN_INTERFACE)
7271
} else if ((modality ?: declaration.modality) == Modality.ABSTRACT) {
73-
reporter.reportOn(reportSource ?: declaration.source, FirJvmErrors.EXTERNAL_DECLARATION_CANNOT_BE_ABSTRACT, context)
72+
reporter.reportOn(reportSource ?: declaration.source, FirJvmErrors.EXTERNAL_DECLARATION_CANNOT_BE_ABSTRACT)
7473
}
7574
}
7675

7776
if (declaration !is FirConstructor && declaration.body != null) {
78-
reporter.reportOn(declaration.source, FirJvmErrors.EXTERNAL_DECLARATION_CANNOT_HAVE_BODY, context)
77+
reporter.reportOn(declaration.source, FirJvmErrors.EXTERNAL_DECLARATION_CANNOT_HAVE_BODY)
7978
}
8079

8180
if (declaration.isInline) {
82-
reporter.reportOn(declaration.source, FirJvmErrors.EXTERNAL_DECLARATION_CANNOT_BE_INLINED, context)
81+
reporter.reportOn(declaration.source, FirJvmErrors.EXTERNAL_DECLARATION_CANNOT_BE_INLINED)
8382
}
8483
}
8584
}

compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/jvm/checkers/declaration/FirJvmFieldApplicabilityChecker.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ object FirJvmFieldApplicabilityChecker : FirPropertyChecker(MppCheckerKind.Commo
6161
} else {
6262
return
6363
}
64-
containingClassSymbol == null && isInsideJvmMultifileClassFile(context) ->
64+
containingClassSymbol == null && isInsideJvmMultifileClassFile() ->
6565
TOP_LEVEL_PROPERTY_OF_MULTIFILE_FACADE
6666
declaration.returnTypeRef.isInlineClassThatRequiresMangling(session) -> RETURN_TYPE_IS_VALUE_CLASS
6767
declaration.returnTypeRef.needsMultiFieldValueClassFlattening(session) -> RETURN_TYPE_IS_VALUE_CLASS
@@ -129,7 +129,8 @@ object FirJvmFieldApplicabilityChecker : FirPropertyChecker(MppCheckerKind.Commo
129129
return backingFieldSymbol?.hasAnnotationWithClassId(JVM_FIELD_ANNOTATION_CLASS_ID, session) == true
130130
}
131131

132-
private fun isInsideJvmMultifileClassFile(context: CheckerContext): Boolean {
132+
context(context: CheckerContext)
133+
private fun isInsideJvmMultifileClassFile(): Boolean {
133134
return context.containingFileSymbol?.hasAnnotation(JVM_MULTIFILE_CLASS_ID, context.session) == true
134135
}
135136
}

compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/jvm/checkers/declaration/FirJvmInvalidAndDangerousCharactersChecker.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ object FirJvmInvalidAndDangerousCharactersChecker : FirBasicDeclarationChecker(M
1717
override fun check(declaration: FirDeclaration) {
1818
val source = declaration.source
1919
when (declaration) {
20-
is FirRegularClass -> FirJvmNamesChecker.checkNameAndReport(declaration.name, source, context, reporter)
21-
is FirSimpleFunction -> FirJvmNamesChecker.checkNameAndReport(declaration.name, source, context, reporter)
22-
is FirTypeParameter -> FirJvmNamesChecker.checkNameAndReport(declaration.name, source, context, reporter)
23-
is FirProperty -> FirJvmNamesChecker.checkNameAndReport(declaration.name, source, context, reporter)
24-
is FirTypeAlias -> FirJvmNamesChecker.checkNameAndReport(declaration.name, source, context, reporter)
25-
is FirValueParameter -> FirJvmNamesChecker.checkNameAndReport(declaration.name, source, context, reporter)
20+
is FirRegularClass -> FirJvmNamesChecker.checkNameAndReport(declaration.name, source)
21+
is FirSimpleFunction -> FirJvmNamesChecker.checkNameAndReport(declaration.name, source)
22+
is FirTypeParameter -> FirJvmNamesChecker.checkNameAndReport(declaration.name, source)
23+
is FirProperty -> FirJvmNamesChecker.checkNameAndReport(declaration.name, source)
24+
is FirTypeAlias -> FirJvmNamesChecker.checkNameAndReport(declaration.name, source)
25+
is FirValueParameter -> FirJvmNamesChecker.checkNameAndReport(declaration.name, source)
2626
is FirFile -> {
2727
declaration.packageDirective.packageFqName.pathSegments().forEach {
28-
FirJvmNamesChecker.checkNameAndReport(it, declaration.packageDirective.source, context, reporter)
28+
FirJvmNamesChecker.checkNameAndReport(it, declaration.packageDirective.source)
2929
}
3030
}
3131
else -> return

0 commit comments

Comments
 (0)