How come you can't have a getter inside a function...
# announcements
b
How come you can't have a getter inside a function? I can do
Copy code
val test: String get() = "test"
outside of a function or inside of a class, but not
Copy code
fun main(args: Array<String>) {
    val test: String get() = "test"
}