Kotlin M12
Pre-release
Pre-release
·
107562 commits
to master
since this release
What's New
- Language
- @-based annotation syntax
- New label syntax (
name@) KClassinstead ofjava.lang.Classused in annotationsconstructorkeyword in primary constructorstraitreplaced withinterface- 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:
breakandcontinueinwhen- 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
valuecan 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)
@ReplaceWithannotation 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