Is there any known issue with delegation in Kotlin...
# getting-started
r
Is there any known issue with delegation in Kotlin 2.1.0-RC? My project doesn't compile with very strange errors when upgrading from 2.0.21 to 2.1.0-RC. Details in thread.
I have a multi-module project. When I put this code in a parent module:
Copy code
public interface TestInterface {
    public fun test()
}

public class Test: TestInterface {
    public override fun test() {
        println("Test")
    }
}

public open class Test2 : TestInterface by Test()
And this code in a submodule:
Copy code
public class Test3 : Test2() {
    init {
        test()
    }
}
It doesn't compile with
Unresolved reference 'test'
When having this code in the same module it works correctly.
I'm using Kotlin/Js and Kotlin/WasmJs compilers (haven't checked this on JVM)
It works fine without delegation in Test2 class.
This looks to me like a very serious bug considering it's an RC version.