adam-mcneilly
09/25/2019, 3:21 PMinit()
not allowed, and I need to add all params.
So far the only work around I have is using a secondary constructor like this. It's not the worst thing but it feels kind of unnecessary:
class MyClass(
private val paramOne: Int = 5,
private val paramTwo: Int = 10
) {
constructor() : this(5, 10)
}
Kris Wong
09/25/2019, 3:23 PMadam-mcneilly
09/25/2019, 3:24 PM@JvmOverloads
.Sam
09/25/2019, 3:25 PMadam-mcneilly
09/25/2019, 3:26 PMrusshwolf
09/25/2019, 9:19 PM