Skip to content

Kotlin 1.0.0 Beta 4

Pre-release
Pre-release
Compare
Choose a tag to compare
@abreslav abreslav released this 22 Dec 18:24
· 84156 commits to master since this release

Language

  • Primary constructor is resolved in the same scope as secondary constructors
  • yield is reserved as a keyword
  • async is reserved in some contexts
  • typeof is reserved as a keyword. In JS, use jsTypeOf()
  • sealed when reserved
  • Multiple fixes in the overload resolution algorithm.
    • The curious case of File.listFiles
  • KPropertyN now extend FunctionN, i.e. list.map(String::length) works now
  • Duplicate bounds for type parameters forbidden
  • Multiple class bounds for type parameters forbidden
  • Array<Nothing> and Array<Nothing?> are prohibited
  • if with no else is not an expression
  • values() and valueOf() in enums are preferred to member of companion objects
  • Better scheme of translation of variant types to Java
  • @JvmSuppressWildards and @JvmWildcard added
  • Statics inherited by companion object are visible without qualification in the outer class and its subclasses
  • Absolute package references dropped. Use alias imports instead
  • Overloads are compared according to actual arguments only
  • Deprecations lifted to errors: Enum.values, local sealed classes, private setter for open property

Library

  • kotlin-test.jar extracted
  • Extensions are moved to specific packages (no source changes required for Kotlin code)
  • javaPrimitiveType and javaObjectType added for KClass
  • IntArray(5) { it * 3 } and other initializers supported for primitive arrays
  • Semantics of null in maps is going to change
  • minWith(comparator)/maxWith(comparator) supported
  • toMap((T) -> Pair<K,V>)` supported
  • FileTreeWalk:
    • constructor is deprecated, preferred construction with fluent builder methods
    • treeFilter is deprecated, recursive filtering now happens in onStart
  • File utilities behavior changes and deprecations

IDE

  • New precise incremental compilation (experimental)
  • Rename for unresolved references
  • Create From Usage for callable references
  • Go to Test and Create Test for top-level functions
  • Intention to convert anonymous function to a lambda
  • Go to Class and Search Everywhere show Kotlin built-in types
  • Debugger: Skip simple getters supported