Does the kotlin REPL have code completion?

Viewed 361

I just opened kotlinc (which apparently defaults to kotlin-jvm ?) and dropped in some hello-world type code:

data class Person(val name: String, val age: Int) {
   val isAdult get() = age >= 20
}

Let's create an instance :

val p = Person("ab", 10)

Hopefully the repl will offer us the properties via tab key .. ?

p.<tab>

The repl beeps on each tab instead of offering the properties of that Person instance. "Just in case" I :quit and opened kotlinc-jvm explicitly - and got the same behavior. Is it to be believed that there were no code completion available? Am I missing some option to starting kotlinc ?

2 Answers

Intellij Kotlin-REPL does have code completion. It makes a ton of sense to use the IDE coming from the creators of the language JetBrains.

enter image description here

enter image description here

Related