Skip to content

Kotlin M13

Pre-release
Pre-release
Compare
Choose a tag to compare
@abreslav abreslav released this 16 Sep 14:03
· 87898 commits to master since this release

What's New

  • Language
    • lateinit properties
    • sealed classes
    • all annotations require @
    • annotation classes named starting with capital letter
    • some former annotations turned into modifiers (data, inline, noinline, tailrec, external, etc.)
    • annotation options: @Target, @Retention, @Repeatable, @MustBeDocumented
    • no requirement to specify return type explicitly for public
    • public by default
    • private on the top level means private to current source file
    • internal visibility checked between modules
    • overload resolution on callable references
    • unambiguous super-calls do not require angle brackets
  • Java interop
    • Java get/set pairs are now seen as properties
    • New layout of class files: each source file is compiled to FileNameKt.class by default
    • @file:JvmName("ClassName") to customize the name of the class
    • @file:JvmMultifileClass to share the same class name across many files in the same package
    • @NotNull and @Nullable types loaded from Java
  • Library
    • fully functional reflection
    • + and - for sets and other collections
    • improved delegates for properties
  • Tools
    • compiler daemon keeps the compiler in memory between builds
    • incremental compilation is smarter with inline functions and privates
    • Java2Kotlin converter supports method references
  • IntelliJ IDEA plugin
    • Pull Members Up/Down refactoring
    • Debugger support for lambdas and inline functions
    • Completion for parameter names and types
    • Highlighting for unused imports
    • Imports are optimized on-the-fly
    • New intentions for for loops