Kotlin code fails to parse

Running on JVM 17 and Kotlin 1.6.20.

Cannot analyse 'app/src/main/kotlin/com/foo/SomeFile.kt' with 'KtChecksVisitor': null
java.util.NoSuchElementException: null
        at kotlin.sequences.FilteringSequence$iterator$1.next(Sequences.kt:184)
        at org.sonarsource.kotlin.checks.CoroutinesTimeoutApiUnusedCheck.visitFunctionCall(CoroutinesTimeoutApiUnusedCheck.kt:73)
        at org.sonarsource.kotlin.api.CallAbstractCheck.visitFunctionCall(CallAbstractCheck.kt:35)
        at org.sonarsource.kotlin.api.CallAbstractCheck.visitCallExpression(CallAbstractCheck.kt:42)
        at org.sonarsource.kotlin.api.CallAbstractCheck.visitCallExpression(CallAbstractCheck.kt:27)
        at org.jetbrains.kotlin.psi.KtCallExpression.accept(KtCallExpression.java:35)
        at org.sonarsource.kotlin.visiting.KtChecksVisitor$visit$1$1$1.invoke(KtChecksVisitor.kt:39)
        at org.sonarsource.kotlin.visiting.KtChecksVisitor$visit$1$1$1.invoke(KtChecksVisitor.kt:34)
        at org.sonarsource.kotlin.plugin.MetricsUtilsKt.measureDuration(MetricsUtils.kt:26)

Hey there.

Thanks fo the report.

You are probably facing [SONARKT-197] S6316 should not crash when a call to cancel is not followed by other expressions - SonarSource. Take a look at the ticket and see if it applies to your source code.

If so (and even if not) – you can disable S6316 in your Kotlin Quality Profile to avoid the rule crashing.