Skip to content

Kotlin M10

Pre-release
Pre-release
Compare
Choose a tag to compare
@abreslav abreslav released this 17 Dec 10:58
· 100674 commits to master since this release

What's new:

  • Language
    • Dynamic types (supported only when compiled to JavaScript)
    • Type inference supports capture for use-site variance
    • [breaking change] Reified type parameters for inline-functions
    • [breaking change] varargs are translated to Array<out T> instead of Array<T>
  • Java Interop
    • Static backing fields for properties in objects
    • [platformStatic] supported for properties
    • [native] annotation and JNI supported
    • HotSwap fixed in debugger (used to break because of lambdas)
    • Support for safe calls in assignments: a?.b = c
  • JavaScript Interop
    • Dynamic types (mentioned above)
    • js("string") function to write inline JS code
    • [nativeInvoke], [nativeGetter] and [nativeSetter] annotations
    • Escaping JS-keywords in generated code
    • No "unused" warnings in native declarations
    • -no-stdlib CLI option
  • Standard Library
    • [potentially breaking change] Array.size() and CharSeqence.length() are functions now
    • [potentially breaking change] CharSequence: charAt() and subsequence() introduced, get() is now an extension
    • mapIndexed, withIndex, forEachIndexed
    • [deprecation] size/length/first/head/tail/last properties
    • empty list/set/map singletons
    • comparator functions (compareBy, thenBy)
    • reified API (filterIsInstance, …)
    • componentN functions on collections: val (x, y) = “a=b”.split(“=”)
  • IDE/Compiler
    • Incremental compilation in mixed Kotlin/Java projects
    • Completion inserts casts to run-time types in Evaluate Expression
    • Copy Reference supported for Kotlin classes
    • Create From Usage supports type arguments, classes and packages
    • Change Signature interoperates with Java and supports type parameters
    • Applications runner supports main() function in objects
    • Automatic stdlib updates for JS, support for using library from plugin
    • Maven projects configuration for JS
    • Code Coverage information in editor (in IntelliJ IDEA 14)
    • Completion improvements: inheritors, sorting and highlighting members
    • Performance optimizations: memory in the IDE, parsing time
  • Build Tools
    • Support for new versions of Gradle and Android Studio