Is Kotlin REPL buggy?

I’ve just experimented a bit with the Kotlin REPL in IntelliJ IDEA 15 (Kotlin 1.0.0-beta-4584). But it doesn’t work properly (or I do something wrong). Take a look at the following screen shot:

If I try the same in http://try.kotlinlang.org everything works as expected.

Are there any tricks to get it working in IntelliJ or do I have to wait for a bug fix?

This code works fine for me in the REPL. What errors do you get?

There are the confusing error markers (as seen in the screenshot) and there is no output of println.

No error message when you hover over an error marker?

Apparently it’s not finding the listOf method. My best (and wild) guess is that the Kotlin version on your class path doesn’t match the version of your IntelliJ Kotlin plugin.

I’ve had the same issue with the REPL. It doesn’t seem to understand auto-imports or classpaths in general yet. It’s a relatively new feature, and I guess right now the Kotlin team are working on getting 1.0 stable and released.

I’d suggesting trying it out briefly each time you upgrade the IDE. But otherwise not bothering with it for a while.

Buggy for me as well – to the extent that it’s currently unusable at all.

Example: type System.out.println("Hi") and hit run – expression will disappear leaving gray box to the right (screenshot).

Hello,

It been quite a while since the last bug report, however I could not replicate this on IntelliJ IDEA 2017.3 EAP with Kotlin plugin 1.1.51 installed.

image

Thanks,
Yuriy