Skip to content

Bugfixes we can catch

Andrey Kuleshov edited this page Sep 22, 2020 · 7 revisions
  1. Name shadowing can cause following issues. There should be no shadowing.

infinite loop:

fun main() {
        var x = 0
        while (x < 10) {
            var x = 0
            x++
        }
}

bugs in logic:

class A {
    val myVariable = "hello"
    fun foo() {
        val myVariable = "hi"
        println(myVariable)
    }
}