Releases: JetBrains/kotlin
Releases · JetBrains/kotlin
1.0.5
Compiler
KT-10210
Annotation written before a block-level expression now applies to the entire expression, not to its first prefixKT-13565
Remove net/sf/cglib/core/* classes from compiler jarsKT-2787
Set reference target and report custom error instead unresolved reference for cases:
interface, generic parameter, object + invoke, class without companion.KT-13408
Fix decompilation of types based on local classifiersKT-13730
Fix signature clash problems when extending Hashtable and similar classes- Support for property reference inlining
KT-11123
Fix implicit type arguments resolution for inner classesKT-11263
Refine diagnostic about type arguments for an outer classKT-12238
,KT-10627
Fix inference when captured type is used as a lambda parameter typeKT-13950
Fix false positive "Cannot capture" error reportingKT-13381
,KT-13396
Prevent generation of delegations to interfaces private methodsKT-13295
Add warning for redundantlateinit
modifierKT-13952
,KT-13005
Prohibit return type mismatch for delegation membersKT-8154
Fix AssertionError when delegating base interface and implementing derived interfaceKT-13969
Fix VerifyError for do-while, continue and a condition in a local variableKT-14025
Fix CCE in OverloadResolver.findRedeclarationsKT-14147
Report error on declaring 'getClass' in class or packageKT-14146
Fix detection of accidental overrides with synthetic bridgeKT-14188
Do not generate mutable collection stubs for Kotlin-only signaturesKT-14195
Write generic signature for autogenerated toArrayKT-13698
Optimize method count for collection stubsKT-14243
Fix wrong invocation descriptor on calling implicitly generated implementation in classKT-11585
Fix "Cannot pop operand off an empty stack" exception when accessing@JvmStatic
propertyKT-14242
Fix runtime exception onarray?.size
- Forbid use of expressions to the left of
::class
KT-13926
Report error on usages of classes deprecated with DeprecationLevel.HIDDENKT-14298
Add-api-version
command line optionKT-5044
Generate more efficient bytecode forin
on ranges withdouble
,float
andlong
element typeKT-14357
Fixed CompilationException in case of try-catch used in false conditionKT-14012
Fixed internal error on every first compilation after the source code changeKT-14304
Fixed inconsistent reporting of 'variable must be initialized' after assignment
in anonymous objectKT-14158
Fixed possible exception thrown when reporting unreachable code diagnosticsKT-7929
,KT-8442
Fixed various exceptions caused by trying to use destructuring declarations outside of a code blockKT-14447
Fixed compiler exception if a value was changed but not usedKT-14201
Fixed compiler exception for anonymous object with invoke and non-trivial closureKT-13890
Fixed incorrect bytecode generation causing IllegalAccessError at runtime for invoking protected method with default argumentsKT-9297
Report "External declaration cannot be abstract" on property with external accessor
Reflection
- Various runtime performance optimizations
KT-13700
Fix reflective access on overridden generic property reference
IDE
KT-12852
Support breadcrumbs for KotlinKT-13474
Fix performance of typing super call lambda- Re-highlight only single function after local modifications
- Show "Variables and values captured in a closure" highlighting only for usages
KT-9125
Support Type Hierarchy on references inside of super type call entriesKT-13838
Add file name to the presentation of private top-level declaration (Go to symbol, etc.)KT-12697
Expand selection selects ": Type"KT-13693
Expand selection stops on brackets in indexing expressionKT-4519
Show first line for folded block commentsKT-5193
Multiline strings are now foldableKT-13473
Structure view now shows local functionsKT-11775
Added icons for class initializersKT-11776
Primary constructor members are shown in Project view when "Show members" is enabledKT-13326
Speed search is now enabled in add import popupKT-3363
Support "Surround withif
" for expressionsKT-13927
exception Fixed on adding second inner class when there is a usage in Java of the first oneKT-9009
Support for auto-import of Java static methods- Improved performance for Find Usages of convention functions
KT-13643
Support for Find Usages ofinvoke
operator methodKT-13605
Find Usages no longer fails to find usages of component function defined in JavaKT-13953
Import member popup no longer suggests methods when only property or variable is validKT-9019
,KT-10178
Improved display of structure when "Group by file structure" is enabledKT-13475
Show context when invoking Show Implementations from Find Usages popupKT-13140
"Copy Reference" now copies JVM name of class or method to clipboardKT-10095
Support "Show expression type" in variable declaration positionKT-10588
Show smart cast information in "Show expression type"KT-11310
,KT-8803
Use short names in Show Expression TypeKT-11640
Optimize imports prevents accidental changes in resolve because of import prioritiesKT-13976
Search Everywhere: Render function parameter typesKT-13977
Search Everywhere: Render extension type in prefix positionKT-12966
Fixed possible deadlock in IDEKT-13136
Reduced plugin memory usage on projects with large number of modulesKT-13861
Correct Parameter Info for SAM adaptersKT-13981
,KT-5117
Add indent before colon of super types list on new lineKT-7718
Fixed indent in constructor delegate callKT-13584
Fixed IDE misbehavior (exceptions, index corruption) after Java to Kotlin conversionKT-12402
Fixed resolve of databinding
classes inside the IDEKT-14131
Formatter now removes spaces in labeled expressionsKT-14327
Allow to select single word on double click in one line doc comment- [
KT-14452
](https://youtrack.jetbrains.com/issue/KT-14452...
Kotlin 1.1 M02 (Early Access Preview)
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 callKT-6840
Make data flow information the same for assigned and assigneeKT-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 literalsKT-13075
Fix codegen for bound class referenceKT-13110
Fix type mismatch error on class literal with integer receiver expressionKT-13172
Report error on "this::class" in super constructor callKT-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 twiceKT-13246
Fix VerifyError with coroutines on DalvikKT-13289
Fix VerifyError with coroutines: Bad type on operand stackKT-13409
Fix generic variable spilling with coroutinesKT-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 typealiasKT-13181
Fix unresolved reference for a type alias from a different moduleKT-13161
Support java static methods calls with typealiasesKT-13835
Do not lose nullability information while expanding type alias in projection positionKT-13422
Prohibit usage of type alias to exception class as an object in 'throw' expressionKT-13735
Fix NoSuchMethodError for generic typealias accessKT-13513
Support SAM constructors for aliased java functional typesKT-13822
Fix exception for start-projection of a type aliasKT-14071
Prohibit using type alias as a qualifier for superKT-14282
Report error on unused type alias with -language-version 1.0KT-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 AnyKT-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 inlineKT-13757
Prohibit referencing nested classes by name with $KT-12985
Do not create range instances for 'for' loop in CharSequence.indicesKT-13931
Optimize generated code for IntRange#contains
Various analysis & diagnostic issues
KT-435
Use parameter names in error messages when calling a function-valued expressionKT-10001
Fix false unnecessary non-null assertion on a pair elementKT-12811
Treat function declaration as final if it is a member of a final classKT-13961
Report REDECLARATION on private-in-file 'foo' vs public 'foo' in different file
JS
Feature support
Library updates
KT-18
Move exceptions fromjava.lang
tokotlin
packageKT-12386
Rewrite JS collections in Kotlin, move them tokotlin.collections
packageKT-7809
Make Collection implementations conform to their declared interfacesKT-7473
Make AbstractCollection.equals check object typeKT-13429
Make 'remove' on fresh iterator throw exception instead of removing last elementKT-13459
Make JS implementation of ArrayList::add(index, element) check the index is in valid rangeKT-8724
Fix MutableIterator.remove() for HashMapKT-10786
Make Map.keys return view of map keys instead of snapshotKT-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 libraryKT-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 collectionsKEEP-13
Provide extension functions to copy mapsKT-18
Introduce type aliases for common exceptions fromjava.lang
inkotlin
packageKT-12762
Makekotlin.ranges.until
return an empty range for "illegal" 'to' parameterKT-12894
Allow nullable receiver foruse
extension
Reflection
New features
KT-8998
Introduce comprehensive API to work with KType instancesKT-10447
Provide a way to check if a KClass is a data classKT-11284
Add KClass.cast extensionKT-13106
Support annotation constructors in reflection
Optimizations
KT-10651
Optimize KClass.simpleName
IDE
New features
KT-12903
Implement "Inline type alias" refactoringKT-12902
Implement "Introduce type alias" refactoringKT-12904
Implement "Create type alias from usage" quick fixKT-9016
Make use of named higher order function parametersKT-12205
Suggest import of Kotlin static members in editor with Java sourceKT-13941
Implement intention for introducing destructured lambda parameters when it's possibleKT-13943
Implement inspection and quickfix for to detect a manual destructuring of for / lambda parameter
Issues fixed
KT-13004
Support bound method references in completionKT-13242
Suggest 'typealias' keyword in completionKT-13244
Override/Implement Members: Do not expand type aliases in the generated membersKT-13611
Go to Class: Fix presentation of type aliasesKT-13759
Rename: Process object-wrapping alias referencesKT-13955
Find Usages: Add special type for usages inside of type aliases- [`KT-13...
1.0.4
Compiler
Analysis & diagnostics
KT-10968
,KT-11075
,KT-12286
Type inference of callable referencesKT-11892
Report error on qualified super call to a supertype extended by a different supertypeKT-12875
Report error on incorrect call of member extension invokeKT-12847
Report error on accessing protected property setter from super class' companionKT-12322
Overload resolution ambiguity with constructor reference when class has a companion objectKT-11440
Overload resolution ambiguity on specialized Map.put implementation from JavaKT-11389
Runtime exception when calling Java primitive overloadingsKT-8200
Exception when using non-generic interface with generic argumentsKT-10237
Exception on an unresolved symbol in a type parameter bound in the 'where' clauseKT-11821
Exception on incorrect number of generic arguments in a type parameter bound in the 'where' clauseKT-12482
Exception: Implementation doesn't have the most specific type, but none of the other overridden methods does eitherKT-12687
Exception when 'data' modifier is applied to objectKT-9620
AssertionError in DescriptorResolver#checkBoundsKT-3689
IllegalAccess on a property with private setter of the subclassKT-6391
Wrong warning for array casting (Array<Any?> to Array)KT-8596
Exception when analyzing nested class constructor reference in an argument positionKT-12982
Incorrect type inference when accessing mutable protected property via reflectionKT-13206
Report "Cast never succeeds" if and only if ClassCastException can be predictedKT-12467
IllegalStateException: Concrete fake override should have exactly one concrete super-declaration: []KT-13340
Report "return is not allowed here" only on the return keyword, not the whole expressionKT-2349
,KT-6054
Report "uninitialized enum entry" if enum entry is referenced before its declarationKT-12809
Report "uninitialized variable" if property is referenced before its declarationKT-260
Do not report "cast never succeeds" when casting nullable to nullableKT-11769
Prohibit access from enum instance initialization code to members of enum's companion objectKT-13371
Fix CompilationException: Rewrite at slice LEAKING_THIS key: REFERENCE_EXPRESSIONKT-13401
Fix StackOverflowError when checking varianceKT-13330
,KT-13349
Fix AssertionError: Illegal resolved call to variable with invokeKT-13421
Fix AssertionError: Only integer constants should be checked for overflowKT-13555
Fix internal error "resolveToInstruction"KT-8989
Change error messages: Replace "invisible_fake" with "invisible (private in a supertype)"KT-13612
Val reassignment in try / catchKT-5469
Incorrect "is never used" warning for value used in catch blockKT-13510
Missing "Nested class not allowed" error for anonymous object inside val initializerKT-13685
Fix NPE when resolving callable references on incomplete code- Change error messages: Fix quotes around keywords in diagnostic messages
- Change error messages: Remove quotes around visibilities
Parser
KT-7118
Improve error message after trailing dot in floating point literalKT-4948
Recover by following keywordKT-7915
Recover after val with no subsequent nameKT-12987
Recover after val with no name before declaration starting with soft keyword
JVM code generation
KT-12909
Do not generate redundant bridge for special built-in overrideKT-11915
Exception in entrySet when Map implementation in Kotlin extends another oneKT-12755
Exception on property generation in multi-file classesKT-12983
VerifyError: Bad type on operand stack in arraylengthKT-12908
Variable initialization in loop causes VerifyError: Bad local variable typeKT-13040
Invalid bytecode generated for extension lambda invocation with safe callKT-13023
Char operations throw ClassCastException for boxed CharsKT-11634
Exception for super call in delegationKT-12359
Redundant stubs are generated on inheriting from java.util.CollectionKT-11833
Error generating constructors of class on anonymous object inheriting from nested class of super classKT-13133
Incorrect InnerClasses attribute value for anonymous object copied from an inline functionKT-13241
Indices optimization leads to VerifyError with smart cast receiverKT-13374
Fix compiler exception when inline function contains anonymous object implementing an interface by delegation
Generated code performance
KT-11964
No TABLESWITCH in when on enum bytecode if enum constant is importedKT-6916
Optimize 'for' over 'downTo'KT-12733
Optimize 'for' over 'rangeTo' as a non-qualified call
Standard Library
KT-13115
,KT-13297
Improve documentation formatting, clarify documentation forFileTreeWalk
,Sequence
andgenerateSequence
.KT-12894
Do not fail inCloseable.use
if the resource isnull
.
Reflection
KT-12915
Runtime exception on callBy of JvmStatic function with default argumentsKT-12967
Runtime exception on reference to generic propertyKT-13370
NullPointerException on companionObjectInstance of a built-in classKT-13462
Make KClass for primitive type equal to the corresponding KClass for wrapper type
IDE
KT-12655
New Kotlin file: extra error message for already existing fileKT-12760
Prohibit running non-Unit returning main functionKT-12893
Impossible to open Kotlin compiler settingsKT-10433
Copy-pasting reference to companion object member causes import dialogKT-12803
Class is marked as unused when it is only used is in method referenceKT-13084
Run test method action executes all tests from same kotlin fileKT-12718
Deadlock due to index reenteringKT-13114
'Unused declaration' option 'JUnit static methods' is always enabledKT-12997
Override/Implement Members: Support "Copy JavaDoc" options for library classesKT-12887
"Extend selection" should select call's invoked expressionKT-13383
,KT-13379
Override/Implement Members: Do not make return type non-nullable if base return type is explicitly nullable- [
KT-13218
](https:/...
Kotlin 1.1 M01 (Early Access Preview)
Language features
-
Coroutines (async/await, generators) (proposal)
Current limitations:
-
Bound callable references (proposal)
-
Type aliases (proposal)
Current limitations:
- type alias constructors for inner classes are not supported yet
- annotations on type alias are not supported yet
- limited IDE support
-
Local delegated properties (proposal)
-
JDK dependent built-in classes (proposal)
-
Sealed class inheritors in the same file (proposal)
-
Allow base classes for data classes (proposal)
Scripting
- Implement support for Script Definition Template
and related functionality, except the following parts:- automatic script templates discovery is not implemented
@file:ScriptTemplate
annotation is not supported- the parameters
javaHome
andscripts
fromKotlinScriptExternalDependencies
are not used yet
- Implement support for custom template-based scripts in IDEA: resolving, completion and navigation to symbols from script classpath and sources
- Implement GradleScriptTemplateProvider extension that supplies a script template if gradle with
kotlin script support is used in the project
Compiler
Issues fixed
KT-4779
Generate default methods for implementations in interfacesKT-11780
Fixed incorrect "No cast needed" warningKT-12156
Fixed incorrect error oninline
modifier inside final classKT-12358
Report missing error "Abstract member not implemented" when a fake method of 'Any' is inherited from an interfaceKT-6206
Generate equals/hashCode/toString in data class always unless it'll cause a JVM signature clash errorKT-8990
Fixed incorrect error "virtual member hidden" for a private method of an inner classKT-12429
Fixed visibility checks for annotation usage on top-level declarationsKT-5068
Introduced a special diagnostic message for "type mismatch" errors such asfun f(): Int = { 1 }
.
Standard Library
KT-8254
Provide standard library supplement artifacts for using with JDK 7 and 8.
These artifacts include extensions for the types available in the latter JDKs, such asAutoCloseable.use
(KT-5899
) orStream.toList
.KT-12753
Provide an access to named group matches ofRegex
match result (for JDK 8 only).- Add
assertFails
overload with message to kotlin-test.
IDE
New features
-
"Leaking this" inspection
This inspection reports dangerous operations inside constructors including:
- Accessing non-final property in constructor
- Calling non-final function in constructor
- Using 'this' as function argument in constructor of non-final class
Issues fixed
1.0.3
Compiler
Analysis & diagnostics
- Combination of
open
andoverride
is no longer a warning KT-4829
Equal conditions inwhen
is now a warningKT-6611
"This cast can never succeed" warning is no longer reported forFoo<T> as Foo<Any>
KT-7174
Declaring members with the same signature as non-overridable methods from Java classes (like Object.wait/notify) is now an error (when targeting JVM)KT-12302
abstract
modifier for a member of interface is no longer a warningKT-12452
open
modifier for a member of interface without implementation is now a warningKT-11111
Overriding by inline function is now a warning, overriding by a function with reified type parameter is an errorKT-12337
Reference to a property with invisible setter now has KProperty type (as opposed to KMutableProperty)
Issues fixed
KT-4285
No warning for a non-tail call when the method inherits default arguments from superclassKT-4764
Spurious "Variable must be initialized" in try/catch/finallyKT-6665
Unresolved reference leads to marking subsequent code unreachableKT-9597
NullPointerException during resolution of complicated star projectionsKT-11750
Exceptions when creating various entries with the name "name" in enumsKT-11998
Smart cast to not-null is not performed on a boolean property inif
conditionKT-10648
Exhaustiveness check does not work when sealed class hierarchy contains intermediate sealed classesKT-10717
Type inference for lambda with local returnKT-11266
Fixed "Empty intersection of types" internal compiler error for some casesKT-11857
Fix visibility check for dynamic members within protected method (when targeting JS)KT-12589
Improved "infix
modifier is inapplicable" diagnostic messageKT-11679
Erroneous call with argument causes Throwable at ResolvedCallImpl.getArgumentMapping()KT-12623
Fix ISE on malformed code
JVM code generation
KT-5075
Optimize array/collection indices usage infor
loopKT-11116
Optimize coercion to Unit, POP operations are backward-propagated
Issues fixed
KT-11499
Compiler crashes with "Incompatible stack heights"KT-11943
CompilationException with extension property of KClassKT-12125
Wrong increment/decrement on Byte/Char/Short.MAX_VALUE/MIN_VALUEKT-12192
Exhaustiveness check isn't generated for when expression returning UnitKT-12200
Erroneously optimized away assignment to a property initialized to zeroKT-12582
"VerifyError: Bad local variable type" caused by explicit loop variable typeKT-12708
Bridge method not generated when data class implements interface with copy() methodKT-12106
import static of reified companion object method throws IllegalAccessError
Performance
- Reduced number of IO operation when loading kotlin compiled classes
Сompiler options
- Allow to specify version of Kotlin language for source compatibility with older releases.
- CLI:
-language-version
command line option - Maven:
languageVersion
configuration parameter, linked withkotlin.compiler.languageVersion
property - Gradle:
kotlinOptions.languageVersion
property in task configuration
- CLI:
- Allow to specify which java runtime target version to generate bytecode for.
- CLI:
-jvm-target
command line option - Maven:
jvmTarget
configuration parameter, linked withkotlin.compiler.jvmTarget
property - Gradle:
kotlinOptions.jvmTarget
property in task configuration
- CLI:
- Allow to specify path to JDK to resolve classes from.
- CLI:
-jdk-home
command line option - Maven:
jdkHome
configuration parameter, linked withkotlin.compiler.jdkHome
property - Gradle:
kotlinOptions.jdkHome
property in task configuration
- CLI:
Standard Library
- Improve documentation (including
KT-11632
) - List iteration used in collection operations is performed with an indexed loop when the list supports
RandomAccess
and the operation isn't inlined
IDE
Completion
New features
- Smart completion after
by
andin
- Improved completion in bodies of overridden members (when no type is specified)
- Improved presentation of completion items for property accessors
- Fixed keyword completion after
try
in assignment expression KT-8527
Include non-imported declarations on the first completionKT-12068
Special completion item for "[]" get-operator accessKT-12080
Parameter names are now higher up in completion list
Issues fixed
- Fixed enum members being present in completion as static members
- Fixed QuickDoc not working for properties generated for java classes
KT-9166
Code completion does not work for synthetic java properties on typing "g"KT-11609
No named arguments completion should be after dotKT-11633
Wrong indentation after completing a statement in data classKT-11680
Code completion of label for existing return with value inserts redundant whitespaceKT-11784
Completion forif
statement should add parentheses automaticallyKT-11890
Completion for callable references does not propose static Java membersKT-11912
String interpolation is not converted to ${} form when accessing this.propertyKT-11957
Nocatch
andfinally
keywords in completionKT-12103
Smart completion for nested SAM-adapter produces short unresolved nameKT-12138
Do not show "::error" in smart completion when any function type accepting one argument is expectedKT-12150
Smart completion suggests to compare non-nullable with nullKT-12124
No code completion for a java property in a specific positionKT-12299
Completion: incorrect priority of property foo over method getFoo in Kotlin-only codeKT-12328
Qualified function name inserted when typing beforeif
KT-12427
Completion doesn't work for "@receiver:" annotation targetKT-12447
Don't use CompletionProgressIndicator in Kotlin pluginKT-12669
Completion should show variant with()
when there is default lambdaKT-12369
Pressing dot after class name should not cause insertion of constructor call
Spring support
New features
KT-11692
Support Spring model diagrams for Kotlin classesKT-12079
Support "Autowired members defined in invalid Spring bean" inspection on Kotlin declarationsKT-12092
Implement bean references in @qualifier annotationsKT-12135
Automatically configure components based onbasePackageClasses
attribute of @componentscanKT-12136
Implement package references inside of string literalsKT-12139
Support Spring configurations linked via @import annotationKT-12278
Implement Spring @Autowired inspectionKT-12465
Implement Spring @componentscan inspection
Issues fixed
1.0.2
Compiler
Analysis & diagnostics
- KT-7437, KT-7971, KT-7051, KT-6125, KT-6186, KT-11649 Implement missing checks for protected visibility
- KT-11666 Report "Implicit nothing return type" on non-override member functions
- KT-4328, KT-11497, KT-10493, KT-10820, KT-11368 Report error if some classes were not found due to missing or conflicting dependencies
- KT-11280 Do not perform smart casts for values with custom
equals
compared with==
- KT-3856 Fix wrong "inner class inaccessible" diagnostic for extension to outer class
- KT-3896, KT-3883, KT-4986
do...while (true)
is now considered an infinite loop - KT-10445 Prohibit initialization of captured
val
in lambda or in local function - KT-10042 Correctly handle local classes and anonymous objects in control flow analysis
- KT-11043 Prohibit complex expressions with class literals in annotation arguments
- KT-10992, KT-11007 Fix multiple problems related to smart casts
- KT-11490 Prohibit nested intersection types in return position
- KT-11411 Report "illegal noinline/crossinline" on parameter of subtype of function type
- KT-3083 Report "conflicting overloads" for functions with parameter of type parameter type
- KT-7265 Parse anonymous functions in blocks as expressions
- KT-8246 Handle break/continue for outer loop correctly in case of try/finally in between
- KT-11300 Report error on increment or augmented assignment when
get
is an operator butset
is not - Report warning about unused anonymous functions
- Improve callable reference type in some ambiguous cases
- Improve multiple diagnostic messages: KT-10761, KT-9760, KT-10949, KT-9887, KT-9550, KT-11239, KT-11819
- Fix several compiler bugs leading to exceptions: KT-9820, KT-11597, KT-10983, KT-10972, KT-11287, KT-11492, KT-11765, KT-11869
JVM code generation
- KT-8269, KT-9246, KT-10143 Fix visibility of protected classes in bytecode
- KT-11363 Fix potential binary compatibility breakage on using
when
over enums in inline functions - KT-11762 Fix VerifyError caused by explicit loop variable type
- KT-11645 Fix NoSuchFieldError on private const property in multi-file class
- KT-9670 Optimize Class <-> KClass wrapping/unwrapping when getting values from annotation
- KT-6842 Optimize unnecessary boxing and interface calls on iterating over ranges
- KT-11025 Don't inline const val properties in non-annotation contexts
- KT-5429 Write nullability annotations on extension receiver parameters
- KT-11347 Preserve source file and line number of call site when inlining certain standard library functions
- KT-11677 Write correct generic signatures for local classes in inlined lambdas
- KT-12127 Do not write unnecessary generic signature for property delegate backing field
- Fix multiple issues leading to exceptions or bad bytecode being generated: KT-11034, KT-11519, KT-11117, KT-11479
Java interoperability
- KT-3068 Load contravariantly projected collections in Java (
List<? super T>
) as mutable collections in Kotlin (MutableList<in T>
) - KT-11322 Do not lose type nullability information in SAM constructors
- KT-11721 Fix wrong "Typechecker has run into recursive problem" error on calling Kotlin get function as synthetic Java property
- KT-10691 Fix wrong "Inherited platform declarations clash" error on inheritance from generic Java class with overloaded methods
Command line compiler
- KT-9546 Flush stdout and stderr before shutdown when executing scripts
- KT-10605 Disable colored output on certain platforms to prevent crashes
- Report warning instead of error on unknown "-X" flags
- Remove the compiler option "Xmultifile-facades-open"
Compiler daemon
- Reduce read disk activity
- Fix compiler daemon JAR cache clearing on IDEA Ultimate
Standard library
- KT-11410 Reduce method count of the standard library by ~2k
- KT-9990 Optimize snapshot operations to return special collection implementations when result is empty or has single element
- KT-10794 EmptyList now implements RandomAccess
- KT-10821 Create at most one wrapper sequence for adjacent drop/take operations on sequences
- KT-11301 Make Map.plus accept Map out-projected by key type as either operand (receiver or parameter)
- KT-11485 Remove implementations of some internal intrinsic functions
- KT-11648 Add deprecated extension MutableList.remove to redirect to valid function removeAt
- KT-11348 kotlin.test: Make inline methods
todo
andcurrentStackTrace
@InlineOnly
not to lose stack trace - KT-11745 Rename parameters of
String.subSequence
to match those ofCharSequence.subSequence
- KT-10953 Clarify parameter order of lambda function parameter of
*Indexed
functions - KT-10198 Improve docs for
binarySearch
functions - KT-9786 Improve docs for
trimIndent
/trimMargin
Reflection
- KT-9952 Improve
toString()
for lambdas and function expressions when kotlin-reflect.jar is available - KT-11433 Fix multiple resource leaks by closing InputStream instances
- KT-8131 Fix exception from calling
KProperty.javaField
on a subclass - KT-10690 Support
javaMethod
andkotlinFunction
for top level functions in a different file - KT-11447 Support reflection calls to multifile class members
- KT-10892 Load annotations of const properties from multifile classes
- KT-11258 Don't crash on requesting members of Java collection classes
- KT-11502 Clarify KClass equality
JS
- KT-4124 Support nested classes
- KT-11030 Support local classes
- KT-7819 Support non-local returns in local lambdas
- KT-6912 Safe calls (
x?.let { it }
) are now inlined - [KT-2670](https://youtrack.jetbrains.com/issue/KT-2...
1.0.1 hotfix update #2
1.0.1 hotfix update
1.0.1
1.0.1
Compiler
Analysis & diagnostics issues fixed:
- KT-2277 Local function declarations are now checked for overload conflicts
- KT-3602 Special diagnostic is reported now on nullable ‘for’ range
- KT-10775 No compilation exception for empty when
- KT-10952 False deprecation warnings removed
- KT-10934 Type inference improved for whens
- KT-10902 Redeclaration is reported for top-level property vs classifier conflict
- KT-9985 Correct handling of safe call arguments in generic functions
- KT-10856 Diagnostic about projected out member is reported correctly on calls with smart cast receiver
- KT-5190 Calls of Java 8 Stream.collect
- KT-11109 Warning is reported on Strictfp annotation on a class because it's not supported yet
- KT-10686 Support generic constructors defined in Java
- KT-6958 Fixed resolution for overloaded functions with extension lambdas
- KT-10765 Correct handling of overload conflict between constructor and function in JPS
- KT-10752 If inferred type for an expression refers to a non-accessible Java class, it's a compiler error to prevent IAE in runtime
- KT-10913, KT-10186, KT-5198 False “unreachable code” fixed for various situations
- Minor: KT-3680, KT-9702, KT-8776, KT-6745, KT-10919, KT-9548
JVM code generation issues fixed:
- KT-11153 NoClassDefFoundError is fixed on primitive iterators during boxing optimization
- KT-7319 Correct parameter names for @JvmOverloads-generated methods
- KT-10425 Non-const values of member properties are not inlined now
- KT-11163 Correct calls of custom compareTo on primitives
- KT-11081 Reified type parameters are correctly stored in anonymous objects
- KT-11121 Generic properties generation is fixed for interfaces
- KT-11285, KT-10958 Special bridge generation refined
- KT-10313, KT-11190, KT-11192, KT-11130 Diagnostics and bytecode fixed for various operations with Long
- KT-11203, KT-11191, KT-11206, KT-8505, KT-11203 Handling of increment / decrement for collection elements with user-defined get / set fixed
- KT-9739 Backticked names with spaces are generated correctly
JS translator issues fixed:
Standard library
- KT-10579 Improved performance of sum() and average() for arrays
- KT-10821 Improved performance of drop() / take() for sequences
IDE
New features:
- Compatibility with IDEA 2016
- Kotlin Education Plugin (for IDEA 2016)
- KT-9752 More usable file chooser for "Move declaration to another file"
- KT-9697 Move method to companion object and back
General issues fixed:
- KT-11277 Correct moving of Java classes from project view
- KT-11256 Navigate Declaration fixed for Java classes with @NotNull parameter in constructor
- KT-10553 A warning provided when Refactor / Move result is not compilable due to visibility problems
- KT-11039 Parameter names are now not missing in parameter info and completion for compiled java code used from kotlin
- KT-10204 Highlight usages in file is working now for function parameter
- KT-10954 Introduce Parameter (Ctrl+Alt+P) fixed when default value is a simple name reference
- KT-10776 Intentions: "Convert to lambda expression" works now for empty function body
- KT-10815 Generate equals() and hashCode() is no more suggested for interfaces
- KT-10818 "Initialize with constructor parameter" fixed
- KT-8876 "Convert member to extension" now removes modality modifiers (open / final)
- KT-10800 Create enum entry now adds comma after a new entry
- KT-10552 Pull Members Up now takes visibility conflicts into account
- KT-10978 Partially fixed, completion for JOOQ became ~ 10 times faster
- KT-10940 Reference search optimized for convention functions
- KT-9026 Editor no more locks up during scala file viewing
- KT-11142, KT-11276 Darkula scheme appearance corrected for Kotlin
- Minor: KT-10778, KT-10763, KT-10908, KT-10345, KT-10696, KT-11041, KT-9434
Configuration issues fixed:
- KT-11213 Kotlin plugin version corrected in build.gradle
- KT-10918 "Update Kotlin runtime" action does not try to update the runtime coming in from Gradle
- KT-11072 Libraries in maven, gradle and ide systems are never more detected as runtime libraries
- KT-10489 Configuration messages are aggregated into one notification
- KT-10831 Configure Kotlin in Project: "All modules containing Kotlin files" does not list modules not containing Kotlin files
- KT-10366 Gradle import: no fake "Configure Kotlin" notification on project creating
Debugger issues fixed:
- KT-10827 Fixed debugger stepping for inline calls
- KT-10780 Breakpoints in a lazy property work correctly
- KT-10634 Watches can now use private overloaded functions
- KT-10611 Line breakpoints now can be created inside lambda in init block
- KT-10673 Breakpoints inside lambda are no more ignored in presence of crossinline function parameter
- KT-11318 Stepping inside for each is optimized
- KT-3873 Editing code while standing on breakpoint is optimized
- KT-7261, KT-7266, KT-10672 Evaluate expression applicability corrected