Hello,
with Kotlin M6, when the logic for initializing class members was a bit complicated, I was using a “constructor function” like this:
public class MyClass(arg: String) {
public val m1: String
MyClass() {
m1 = computeM1(arg)
}
}
I am trying to upgrade to M7, but this doesn't work anymore. The compiler complains about MyClass not being an annotation class on the line:
MyClass() {
I could use pretty much any name, it didn’t have to be MyClass(). I tried using another name, but then it still tries to resolve the name into an annotation class.
Did the syntax for those “constructor function” change?