Kotlin M1 Candidate

IntelliJ IDEA 11.1 has been recently released, and we are happy to announce a milestone candidate build for Kotlin IDE plugin, too. This post gives an overview of what happened over the last month.

Milestone Candidate Build is Ready for Your Evaluation

To install on IntelliJ IDEA 11.1 (Free Community Edition is available here), please follow the instructions from the Getting Started guide. In short:

You can always download nightly builds of Kotlin from our build server or build it yourself from sources.

Now we proceed to a short overview of the New and Noteworthy. Please refer to this blog post for the previously implemented features.

Little Things that Matter

First of all, we did very many bugfixes, improvements and other important things that are hard to demo. See the commit history on github and the closed issues in YouTrack.


With the power of extension functions, Kotlin makes existing Java APIs better. In particular, we provide enhancements for JDK collections so that you can say things like this:

Here, filter() and join() are extension functions.

Implementation-wise, extension functions are just static utility functions, like “good old” Java’s Collecions.*, but with the “receiver.function()” call syntax, the IDE makes them much better: there is code completion that helps you browse through the API and learn it (just as if the extensions were normal class members):

You can navigate to sources of library functions:

And see the doc comments there:

The HTML version of the library docs is available here.

GitHub Support

Kotlin highlighting is now supported by github, including gist.


Kotlin now supports annotations. Here’s a small example that relies on JUnit 4:

Read more here.

String Templates

Now you can use multi-line string templates, for example:

Simple Enums

Simple cases of enum classes are now supported. For example:

Local Functions

Functions can be declared inside other functions:


Kotlin now recognizes the @Nullable and @NotNull annotations). If the Java code says:

Kotlin will trat foo() as returning a non-nullable String.

A short-hand operator (!!) for converting a nullable value into a non-nullable one is added:

Byte Code Unveiled

Click on the Kotlin button on the right edge of the IDEA window, and choose the “Bytecode” tab. You’ll see the byte-code Kotlin generates for your program!

Your feedback is very welcome. Have a nice Kotlin!

About Andrey Breslav

Andrey is the lead language designer of Kotlin at JetBrains.
This entry was posted in Releases and tagged . Bookmark the permalink.

15 Responses to Kotlin M1 Candidate

  1. Loic says:

    Thanks for this great work!

  2. jenniferashleykuiper@gmail.com says:

    Failed to load descriptor. :( (Mac Lion)

  3. jenniferashleykuiper@gmail.com says:

    Resolved now :D

  4. If foo!!.bar() raises NPE if foo is null, how exactly does that differ from simply calling foo.bar()?

    • Nikolay Krasko says:

      After !!. operator was added to Kotlin program there’s no difference in behavior from foo.bar() call in Java. But the great difference was at previous step when compiler was able to find a place with probable NPE threat and asked programmer to resolve it explicitly.

      You can find more information about null-safety feature in Kotlin on this wiki page.

      • Justin Lee says:

        So if I read that correctly, without !!, the compiler will fail on a possible null reference. But the !! tells the compiler to butt out and let it fail at runtime?

        • Nikolay Krasko says:

          Yes you’re right. And this is the reason why !! calls should be used with great caution or avoided completely. If you are in Kotlin and not planning to assign null value to variable just declare it with not-nullable type. While working with methods and variables from Java it’s better to choose some safe way to deal with possible null value. It can be ?. call or pre-check to null.

    • Hey Charles,

      Glad to see you here!

  5. Alex Yakunin says:

    Guys, what you do is awesome!

    Personally I’d switch to Kotlin right after first RC.

  6. Sergii Rudchenko says:

    Thank you guys, this is a brilliant work!
    I’ll switch to Kotlin as soon as it gets Android support.

    Also Kotlin has inspired me to switch to IntelliJ IDEA :)
    Keep up the good work!

  7. Guangyu says:

    How to use JUnit with kotlin? or how to have unit test with kotlin? Can you provide any example on it ?

    I found compile speed will become very very slow, and KCompile will report the following error:

    java.lang.IllegalStateException: Internal error: (14,72) java.lang.AssertionError
    at org.jetbrains.jet.codegen.CompilationErrorHandler$1.reportException(CompilationErrorHandler.java:27)
    at org.jetbrains.jet.codegen.GenerationState.compileCorrectFiles(GenerationState.java:120)
    at org.jetbrains.jet.compiler.CompileSession.generate(CompileSession.java:161)
    at org.jetbrains.jet.compiler.CompileEnvironment.compileModule(CompileEnvironment.java:156)
    ... 89 more

    even for the following code:

    package hhh.csp

    import org.apache.log4j.Logger
    import org.apache.log4j.PropertyConfigurator
    import org.junit.*
    import org.junit.rules.ExpectedException
    import junit.framework.TestCase
    import junit.framework.TestSuite

    public class IntervalTest(name :String) : TestCase(name) {

    fun testIntervalPlus() {
    val values : Array = Array(10000,{Interval.zero()});
    var v:Interval = Interval.zero();
    for( i in values ) i.u = 1.0;
    for ( i in values) v = v+i;


Comments are closed.