kotlin - How to declare several properties on one line -
i'm developing class several lateinit
properties of 1 type. think it's verbose declare each of them on separate line this:
lateinit var a: string lateinit var b: string
so declare them on 1 line this:
lateinit var b, c: string // error: property getter or setter expected
but error property getter or setter expected
. there way declare several properties on 1 line in kotlin?
no, there no way that. declaring multiple properties on same line frowned upon many java style guides, did not implement support in kotlin.
Comments
Post a Comment