What language is this for?
kotlin
Which rule?
S6517
Why do you believe it’s a false-positive/false-negative?
In Kotlin, a functional interface cannot have default values defined in abstract method signature. The following example would not compile if fun prefix was added to the interface declaration.
interface Foo {
fun bar(baz: Int = 0)
}
This is similar issue to the one reported here: kotlin:S6517 should ignore interface which contains generic method. The difference is that this time it is not generics, but default values preventing making Kotlin interface functional.
Versions
- SonarQube for IDE (10.23.0.81344)
- IntelliJ IDEA 2025.1.1.1
- Kotlin 2.1.21