https://kotlinlang.org logo
#konsist
Title
# konsist
d

David

10/02/2023, 10:00 AM
The snippet Properties are declared before functions does not seem to work correctly.
._indexOfFirstInstance_<KoFunctionDeclaration>()
seems to also hit secondary constructors. Here is a test that will break:
Copy code
class Test(val string: String) {
    constructor(int: Int): this(int.toString())

    val something = ""

    fun doSomething() {
    }
}
I tried looking at some solutions but it seems to be hard to find out from the API surface the difference between a function and a secondary constructor.
👍 1
n

Natalia Peterwas

10/02/2023, 10:35 AM
Thanks for reporting this issue, it looks like our bug. 🐛 We will check it and try to fix it 🙂
d

David

10/02/2023, 10:36 AM
💃 super 🤗
i

igor.wojda

10/09/2023, 11:38 AM
A new version
v0.13.0
has been released. It contains the fix. See https://github.com/LemonAppDev/konsist/releases/tag/v0.13.0
🙌 1
d

David

10/09/2023, 11:47 AM
Thanks @igor.wojda 🙏