<Kotlin REPL: captured member values initializatio...
# stackoverflow
u
Kotlin REPL: captured member values initialization is forbidden due to possible reassignment In the Kotlin REPL, I tried to print an immutable value like this: val a:Int a = 5 print("Value of a is: ${a}") When I execute above code in Android Studio(3.2) with Kotlin(1.2.71) it's thrown an error: error: captured member values initialization is forbidden due to possible reassignment a = 5 ^ But when I run same part of code at play.kotlinlang.org then it executed successfully and print the output....