Skip to content

Commit

Permalink
remove a getPsi() from TrailingCommaOnDeclarationSiteRule
Browse files Browse the repository at this point in the history
  • Loading branch information
mgroth0 committed Dec 29, 2024
1 parent fe71a48 commit d92140d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import org.ec4j.core.model.PropertyType.PropertyValueParser
import org.jetbrains.kotlin.KtNodeTypes.WHEN_ENTRY_GUARD
import org.jetbrains.kotlin.com.intellij.lang.ASTNode
import org.jetbrains.kotlin.com.intellij.psi.PsiElement
import org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.LeafElement
import org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.LeafPsiElement
import org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.PsiWhiteSpaceImpl
import org.jetbrains.kotlin.com.intellij.psi.tree.TokenSet
Expand Down Expand Up @@ -324,7 +325,7 @@ public class TrailingCommaOnDeclarationSiteRule :
.treeParent
.indent()
if (leafBeforeArrowOrNull.isWhiteSpace()) {
(leafBeforeArrowOrNull.psi as LeafPsiElement).rawReplaceWithText(indent)
(leafBeforeArrowOrNull as LeafElement).rawReplaceWithText(indent)
} else {
inspectNode
.prevCodeLeaf()
Expand Down

0 comments on commit d92140d

Please sign in to comment.