The snippet <Properties are declared before functi...
# konsist
d
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
Thanks for reporting this issue, it looks like our bug. ๐Ÿ› We will check it and try to fix it ๐Ÿ™‚
d
๐Ÿ’ƒ super ๐Ÿค—
i
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
Thanks @igor.wojda ๐Ÿ™