Kotlin 1.0.0 Beta 4
Pre-release
Pre-release
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 keywordasync
is reserved in some contextstypeof
is reserved as a keyword. In JS, usejsTypeOf()
sealed
when reserved- Multiple fixes in the overload resolution algorithm.
- The curious case of
File.listFiles
- The curious case of
KPropertyN
now extendFunctionN
, i.e.list.map(String::length)
works now- Duplicate bounds for type parameters forbidden
- Multiple class bounds for type parameters forbidden
Array<Nothing>
andArray<Nothing?>
are prohibitedif
with noelse
is not an expressionvalues()
andvalueOf()
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
andjavaObjectType
added forKClass
IntArray(5) { it * 3 }
and other initializers supported for primitive arrays- Semantics of
null
in maps is going to change minWith(comparator)
/maxWith(comparator)
supportedtoMap((T)
-> Pair<K,V>)` supportedFileTreeWalk
:- constructor is deprecated, preferred construction with fluent builder methods
treeFilter
is deprecated, recursive filtering now happens inonStart
- 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