Skip to content

Kotlin 1.0.0 Beta 3

Pre-release
Pre-release

Choose a tag to compare

@abreslav abreslav released this 07 Dec 11:49
· 101905 commits to master since this release

What's new

  • Library
    • increment deprecated in Progressions in favor of step property to Progressions, for-loops updated to refer to step
    • contains() and other similar extensions now accept supertypes of the element of the collection
    • Delegates.mapVal and mapVar, MapVal, MapVar, FixedMapVal, FixedMapVar are deprecated
    • String.toCharArray() introduced instead of String.getChars(); String.toCharList() deprecated
    • MutableCollection.removeAll(predicate: (T) -> Boolean) and similar for retainAll added
    • sequence(initialValueFunction, nextValueFunction) doesn't evaluate first value until it's requested by sequence iterator
    • sequenceOf(Progression) deprecated
    • flatten operation for Sequence<Iterable<...>> added
  • Language
    • No references to PropertyMetadata are generated in the byte code
    • Suffixes to numeric literals, such as 1baz are prohibited
    • Comma-separated conditions in when without an argument are prohibited (KT-5143)
    • Annotation classes can't be instantiated (KT-4391)
    • Arrays of annotations supported as annotation arguments (KT-10136)
    • Generic types in catch clauses (including reified T) are prohibited (KT-9816)
    • protected members are allowed in companion objects
    • Calls to non-@JvmStatic protected members of companion objects from subclasses are marked as errors (unsupported)
    • "" is reserved as a token (KT-9708)
    • Enum entry can not be used as a type (KT-5401)
    • Enum.values is deprecated in favor of Enum.values()
    • private setters are now deprecated for open properties
    • Local sealed classes are deprecated
    • Use of uninitialized variables in lambdas / object literals / local functions is forbidden
    • Overriding setter cannot weaken visibility
    • Inner classes are no longer allowed inside enum entries
    • Implicit receiver smart casts are supported
    • Older deprecations have become errors