From ca994ddeeb88bcba3cb1c9454ddf4a16e857c752 Mon Sep 17 00:00:00 2001 From: aktsay6 Date: Thu, 21 Jan 2021 11:03:28 +0300 Subject: [PATCH] feature/inline-classes(#698) ### What's done: * Fixed bugs --- .../org/cqfn/diktat/ruleset/rules/classes/InlineClassesRule.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/classes/InlineClassesRule.kt b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/classes/InlineClassesRule.kt index 5a4264fd51..803de3cf01 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/classes/InlineClassesRule.kt +++ b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/classes/InlineClassesRule.kt @@ -58,7 +58,7 @@ class InlineClassesRule(private val configRule: List) : Rule("inlin } else if (classPsi.getProperties().isEmpty() && classPsi.hasExplicitPrimaryConstructor()) { return classPsi.primaryConstructorParameters.size == 1 && !classPsi.primaryConstructorParameters.first().node.hasChildOfType(VAR_KEYWORD) && - classPsi.primaryConstructor?.visibilityModifierType()?.value ?: "public" == "public" + classPsi.primaryConstructor?.visibilityModifierType()?.value?.let { it == "public" } ?: true } return false }