Well `tailrec` on a function that doesn't actually...
# intellij
k
Well
tailrec
on a function that doesn't actually have any tail recursion is always a mistake, so it deserves a warning. Consider this code though:
Copy code
fun foo(list: List<Int>) {
    list.forEach {
        if(it == 0) return
        println(it)
    }
    println("done")
}
The
return
here isn't wrong, so it shouldn't get a warning. How do you separate them?