New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnreachableCode: false positive when use error from Coil #4250
Comments
I just created a fast Unit test and I can't reproduce your behaviour: it("Does not report unreachable code after custom error function") {
val code = """
fun error(a: Int) {
println(a)
}
fun test(): Int {
error(5)
return 0
}
"""
assertThat(subject.compileAndLintWithContext(env, code)).isEmpty()
} Could you provide a project to reproduce this issue? |
Yes, I'm trying to create a simple reproducer |
Looking at the CI failure this is likely a duplicate of #4253
|
Observed Behavior
Context
We use Coil library for image loading and there are methods called
error
.It looks like detekt considers all functions with the name
error
as Kotlin'serror
function.Steps to reproduce
A project to reproduce the issue
Your Environment
The text was updated successfully, but these errors were encountered: