IntelliJ highlights var mutableVariable: String
with an underline.
IntelliJ also highlights lateinit var mutableVariable: String
with an underline. In practice, my lateinit vars are effectively immutable.
I would like to underline var
, but not lateinit var
. Does IntelliJ support this use case?
Non-null fields must be initialised
var mutableVariable: String = ""
This is valid yet var
means that variable is mutable. You can't have lateinit val
lateinit var mutableVariable: String
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.