Are there differences between REPL and source code...
# announcements
j
Are there differences between REPL and source code?:
Copy code
// source code
fun main(args: Array<String>) {
    val value: Int
    value = 3
}
Copy code
// REPL
>>> val value: Int
error: property must be initialized or be abstract
val value: Int
a
yes, inside the source code the compiler sees that
value
is initialized in the next line, inside the REPL it can't tell if you'll initialize it in the next line or use it without initializing it
👍 1
j
Thanks @Andreas Sinz!!