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

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

r - Update two sets of radiobuttons reactively - shiny -