Skip to content

Kotlin M12

Pre-release
Pre-release
Compare
Choose a tag to compare
@abreslav abreslav released this 29 May 12:27
· 90650 commits to master since this release

What's New

  • Language
    • @-based annotation syntax
    • New label syntax (name@)
    • KClass instead of java.lang.Class used in annotations
    • constructor keyword in primary constructors
    • trait replaced with interface
    • New syntax for enums: delimiters and constructor calls
    • Unified Function types
    • Smart casts for local var's
    • Smart casts for public/protected val's within the same module
    • Inlining and non-local returns for function expressions
    • Deprecations/Removals:
      • break and continue in when
      • interfaces that extend classes
      • covariant supertype specialization
      • static type assertions
  • Java Interop
    • Source maps (JSR-45) for better debugging of inline functions
    • Initial support for Annotation Processing (JSR-269)
    • [deprecation] Only value can be passed as positional to Java annotations
  • JavaScript
    • Inlining works between modules
    • Reified parameters
    • Function expressions
    • Secondary constructors
  • JUnit support in Gradle plugin for Android
  • Standard Library
    • kotlin.io
    • new text utilities
    • regular expressions API unified across JVM and JS
    • new collections utilities
    • full list available here
  • IntelliJ IDEA Plugin
    • Introduce Parameter
    • Introduce Lambda Parameter
    • Rename for related declarations (variables, subclasses)
    • @ReplaceWith annotation for deprecated declarations
    • Debugger
      • Evaluate expression for local functions
      • Field Watch Points (only for properties with backing field)
    • Change Package Intention
    • Highlighting exit points of functions
    • Gutter Marks for recursive calls
    • Unused receiver parameter
    • Code style settings for imports (e.g. we can now always import specified packages with '*')
    • Java2Kotlin Converter now offers to update usages in other files
    • Typing '!' when completion list is open inserts negated call (e.g. !foo.isEmpty())
    • Intention actions to change visibility modifiers
    • Intention actions have much better scope of availability now
    • Quick-fix to add parameters from the base class when the superclass' constructor has parameters