fork download
  1. lateinit val v1: String
  2. lateinit var v2: String?
  3. lateinit var v3: String
  4. lateinit var v4: Int
  5.  
  6. fun main(args: Array<String>) {
  7. println(v3)
  8. }
  9.  
Compilation error #stdin compilation error #stdout 0.08s 33360KB
stdin
Standard input is empty
compilation info
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.intellij.openapi.util.JDOMUtil$2 to constructor com.sun.xml.internal.stream.XMLInputFactoryImpl()
WARNING: Please consider reporting this to the maintainers of com.intellij.openapi.util.JDOMUtil$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
JNA Warning: IOException removing temporary files: JNA temporary directory '/tmp' is not writable
prog.kt:1:1: error: 'lateinit' modifier is allowed only on mutable properties
lateinit val v1: String
^
prog.kt:2:1: error: 'lateinit' modifier is not allowed on properties of nullable types
lateinit var v2: String?
^
prog.kt:4:1: error: 'lateinit' modifier is not allowed on properties of primitive types
lateinit var v4: Int
^
stdout
Standard output is empty