Skip to content

Latest commit

 

History

History
151 lines (119 loc) · 11.4 KB

ChangeLog.md

File metadata and controls

151 lines (119 loc) · 11.4 KB

CHANGELOG

1.1-M02 (EAP-2)

Language features

  • Destructuring for lambdas (proposal)

    Current limitations:

    • Nested destructuring is not supported
    • Destructuring in named functions/constructors is not supported
    • Is not supported for JS target

Compiler

Smart cast enhancements

  • KT-2127 Smart cast receiver to not null after a not null safe call
  • KT-6840 Make data flow information the same for assigned and assignee
  • KT-13426 Fix exception when smartcast on both dispatch & extension receiver

Bound references related issues

  • KT-12995 Do not skip generation of the left-hand side for intrinsic bound references and class literals
  • KT-13075 Fix codegen for bound class reference
  • KT-13110 Fix type mismatch error on class literal with integer receiver expression
  • KT-13172 Report error on "this::class" in super constructor call
  • KT-13271 Fix incorrect unsupported error on synthetic extension call on LHS of ::
  • KT-13367 Inline bound callable reference if it's used only as a lambda

Coroutines related issues

  • KT-13156 Do not execute last Unit-typed coroutine statement twice
  • KT-13246 Fix VerifyError with coroutines on Dalvik
  • KT-13289 Fix VerifyError with coroutines: Bad type on operand stack
  • KT-13409 Fix generic variable spilling with coroutines
  • KT-13531 Fix ClassCastException when coercion to Unit interacts with generic await() and coroutines
  • Prohibit Continuation<*> as a last parameter of suspend functions
  • KT-13560 Prohibit non-Unit suspend functions

Typealises related issues

  • KT-13200 Fix incorrect number of required type arguments reported on typealias
  • KT-13181 Fix unresolved reference for a type alias from a different module
  • KT-13161 Support java static methods calls with typealiases
  • KT-13835 Do not lose nullability information while expanding type alias in projection position
  • KT-13422 Prohibit usage of type alias to exception class as an object in 'throw' expression
  • KT-13735 Fix NoSuchMethodError for generic typealias access
  • KT-13513 Support SAM constructors for aliased java functional types
  • KT-13822 Fix exception for start-projection of a type alias
  • KT-14071 Prohibit using type alias as a qualifier for super
  • KT-14282 Report error on unused type alias with -language-version 1.0
  • KT-14274 Fix type alias resolution when it's used for supertype constructor call

JDK dependent built-in classes related issues

  • KT-13209 Change first parameter's type of Map.getOrDefault to K instead of Any
  • KT-13069 Do not emit invalid DefaultImpls delegation when interface extends MutableMap with JDK8

data classes and inheritance

  • KT-11306 Allow data classes to implement equals/hashCode/toString from base classes

Various JVM code generation issues

  • KT-13182 Fix compiler internal error at inline
  • KT-13757 Prohibit referencing nested classes by name with $
  • KT-12985 Do not create range instances for 'for' loop in CharSequence.indices
  • KT-13931 Optimize generated code for IntRange#contains

Various analysis & diagnostic issues

  • KT-435 Use parameter names in error messages when calling a function-valued expression
  • KT-10001 Fix false unnecessary non-null assertion on a pair element
  • KT-12811 Treat function declaration as final if it is a member of a final class
  • KT-13961 Report REDECLARATION on private-in-file 'foo' vs public 'foo' in different file

JS

Feature support

Library updates

  • KT-18 Move exceptions from java.lang to kotlin package
  • KT-12386 Rewrite JS collections in Kotlin, move them to kotlin.collections package
  • KT-7809 Make Collection implementations conform to their declared interfaces
  • KT-7473 Make AbstractCollection.equals check object type
  • KT-13429 Make 'remove' on fresh iterator throw exception instead of removing last element
  • KT-13459 Make JS implementation of ArrayList::add(index, element) check the index is in valid range
  • KT-8724 Fix MutableIterator.remove() for HashMap
  • KT-10786 Make Map.keys return view of map keys instead of snapshot
  • KT-14194 Make HashMap.putAll implementation not to call getKey/getValue

Standard Library

Backward compatibility

  • KT-14297 Add @SinceKotlin annotation to support compatibility with compilation against older standard library
  • KT-14213 Ensure printStackTrace can be called with -language-version 1.0

Enhancements

  • KEEP-53 Provide two distinct hierarchies of abstract collections: one for implementing read-only/immutable collections, and other for implementing mutable collections
  • KEEP-13 Provide extension functions to copy maps
  • KT-18 Introduce type aliases for common exceptions from java.lang in kotlin package
  • KT-12762 Make kotlin.ranges.until return an empty range for "illegal" 'to' parameter
  • KT-12894 Allow nullable receiver for use extension

Reflection

New features

  • KT-8998 Introduce comprehensive API to work with KType instances
  • KT-10447 Provide a way to check if a KClass is a data class
  • KT-11284 Add KClass.cast extension
  • KT-13106 Support annotation constructors in reflection

Optimizations

IDE

New features
  • KT-12903 Implement "Inline type alias" refactoring
  • KT-12902 Implement "Introduce type alias" refactoring
  • KT-12904 Implement "Create type alias from usage" quick fix
  • KT-9016 Make use of named higher order function parameters
  • KT-12205 Suggest import of Kotlin static members in editor with Java source
  • KT-13941 Implement intention for introducing destructured lambda parameters when it's possible
  • KT-13943 Implement inspection and quickfix for to detect a manual destructuring of for / lambda parameter
Issues fixed
  • KT-13004 Support bound method references in completion
  • KT-13242 Suggest 'typealias' keyword in completion
  • KT-13244 Override/Implement Members: Do not expand type aliases in the generated members
  • KT-13611 Go to Class: Fix presentation of type aliases
  • KT-13759 Rename: Process object-wrapping alias references
  • KT-13955 Find Usages: Add special type for usages inside of type aliases
  • KT-13479 Support navigation to type aliases from binaries
  • KT-13766 Fix optimize imports not to add wrong and unnecessary import because of type alias
  • KT-12949 Consider type aliases as candidates for import
  • KT-13266 Suggest non-imported type aliases in completion
  • KT-13689 Do not treat type alias constructor usage as original type usage for optimize imports

Scripting

  • A new library kotlin-script-util containing utilities for implementing kotlin script support
  • KT-7880 Experimental support for JSR 223 Scripting API
  • KT-13975, KT-14264 Convert error on retrieving gradle plugin settings to warning
  • Implement support for custom template-based scripts in command-line compiler, maven and gradle plugins

Previous releases

This release also includes the following issues fixed in 1.0.5 and 1.1-M01

Note that not all of the issues of the final 1.0.5 release will be included in M02, but only ones mentioned on the page from the hyperlink above.