Releases: JetBrains/kotlin
Kotlin 1.1-Beta
Reflection
KT-15540
findAnnotation returns T?, but it throws NoSuchElementException when there is no matching annotation- Reflection API in
kotlin-reflect
library is moved tokotlin.reflect.full
package, declarations in the packagekotlin.reflect
are left deprecated. Please migrate according to the hints provided.
Compiler
Coroutine support
KT-15379
Allow invoke on instances of suspend function type inside suspend functionKT-15380
Support suspend function type with value parametersKT-15391
Prohibit suspend function type in supertype listKT-15392
Prohibit local suspending functionKT-15413
Override regular functions with suspending ones and vice versaKT-15657
Refine dispatchResume conventionKT-15662
Prohibit callable references to suspend functions
Diagnostics
KT-9630
Cannot create extension function on intersection of typesKT-11398
Possible false positive for INACCESSIBLE_TYPEKT-13593
Do not report USELESS_ELVIS_RIGHT_IS_NULL for left argument with platform typeKT-13859
Wrong error about using unrepeatable annotation when mix implicit and explicit targetsKT-14179
Prohibit to use enum entry as type parameterKT-15097
Inherited platform declarations clash: regression under 1.1 when indirectly inheriting from java.util.MapKT-15287
Kotlin runtime 1.1 and runtime 1.0.x: Overload resolution ambiguityKT-15334
Incorrect "val cannot be reassigned" inside do-whileKT-15410
"Protected function call from public-API inline function" for protected constructor call
Kapt3
KT-15145
Kapt3: Doesn't compile with multiple errorsKT-15232
Kapt3 crash due to java codepageKT-15359
Kapt3 exception while annotation processing (DataBindings AS2.3-beta1)KT-15375
Kapt3 can't find ${env.JDK_18}/lib/tools.jarKT-15381
Unresolved references: R with Kapt3KT-15397
Kapt3 doesn't work with databindingKT-15409
Kapt3 Cannot find the getter for attribute 'android:text' with value type java.lang.String on android.widget.EditText.KT-15421
Kapt3: Substitute types from Psi instead of writing NonExistentClass for generated type namesKT-15459
Kapt3 doesn't generate code in test moduleKT-15524
Kapt3 - Error messages should display associated element information (if available)KT-15713
Kapt3: circular dependencies between Gradke tasks
Exceptions / Errors
KT-11401
Error type encountered for implicit invoke with function literal argumentKT-12044
Assertion "Rewrite at slice LEXICAL_SCOPE" for 'if' with property referencesKT-14011
Compiler crash when inlining: lateinit property allRecapturedParameters has not been initializedKT-14868
CCE in runtime while converting Number to CharKT-15364
VerifyError: Bad type on operand stack on ObserverIterator.hasNextKT-15373
Internal error when running TestNG testKT-15437
VerifyError: Bad local variable type on simplest provideDelegateKT-15446
Property reference on an instance of subclass causes java.lang.VerifyErrorKT-15447
Compiler backend error: "Don't know how to generate outer expression for class"KT-15449
Back-end (JVM) Internal error: Couldn't inline method callKT-15464
Regression: "Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:"KT-15575
VerifyError: Bad type on operand stack
Various issues
KT-11962
Super call with default parameters check is generated for top-level functionKT-11969
ProGuard issue with private interface methodsKT-12795
Write information about sealed class inheritors to metadataKT-13718
ClassFormatError on aspectj instrumentationKT-14162
Support @InlineOnly on inline propertiesKT-14705
Inconsistent smart casts on when enum subjectKT-14917
No way to pass additional java command line options to kontlinc on WindowsKT-15112
Compiler hangs on nested lock compilationKT-15225
Scripts: generate classes with names that are valid Java identifiersKT-15411
Unnecessary CHECKCAST bytecode when dealing with nullKT-15473
Invalid KFunction byte code signature for callable referencesKT-15582
Generated bytecode is sometimes incompatible with Java 9KT-15584
Do not mark class files compiled with a release language version as pre-releaseKT-15589
Upper bound for T in KClass can be implicitly violated using generic functionKT-15631
Compiler hang in MethodAnalyzer.analyze() fixed
JavaScript backend
Coroutine support
KT-15362
JS: Regex doesn't work (properly) in coroutineKT-15366
JS: error when calling inline function with optional parameters from another module inside coroutine lambdaKT-15367
JS:for
against iterator with suspendnext
andhasNext
functions does not workKT-15400
suspendCoroutine is missing in JS BEKT-15597
Support non-tail suspend calls inside named suspend functionsKT-15625
JS: return statement without value surrounded bytry..finally
in suspend lambda causes compiler errorKT-15698
Move coroutine intrinsics to kotlin.coroutine.intrinsics package
Diagnostics
KT-14577
JS: do not report declaration clash when common redeclaration diagnostic appliesKT-15136
JS: prohibit inheritance from kotlin Function{N} interfaces
Language features support
KT-12194
Exhaustiveness check isn't generated for when expressions in JS at allKT-15590
Support increment on inlined properties
Native / external
KT-8081
JS: native inherited class shouldn't require super or primary constructor callKT-13892
JS: restrictions for native (external) functions and propertiesKT-15307
JS: prohibit inline members inside external declarationsKT-15308
JS: prohibit non-abstract members inside external interfaces except nullable properties (with accessors)
Exceptions / Errors
KT-7302
KotlinJS - Trait with optional parameter causes compilation errorKT-15325
JS: ReferenceError: $receiver is not definedKT-15357
JS:when
expression in primary-from-secondary constructor callKT-15435
Call to 'synchronize' crashes JS backendKT-15513
JS: empty do..while loop crashes compiler
Various issues
- [
KT-4160
](https://youtrack.jetbra...
Kotlin 1.0.6
Compiler
KT-12224
Add a diagnostic message for@JvmOverloads
on interface methodsKT-14186
Vararg parameters were generated as simple array parameters for JavaKT-12664
Inner class was not found when a sub-directory with the same name is present in an outer class directoryKT-14408
No-arg constructor should always be generated if all primary constuctor arguments have a default valueKT-14469
StackOverflowError at EffectiveVisibilityKt.forVisibilityKT-14581
NullPointerException at StackTransformationUtils when inlining extension function to ado-while
loop conditionKT-14678
Internal error with@JvmOverloads
on constructor of inner classKT-14751
Class can't be resolved (related to annotation on types)KT-14774
Incorrect inner class modifier was generated forsealed
inner classes
Stdlib
KT-14883
Performance tune: Use byte array buffer directly to read the entire contents of a file
JS
KT-12976
Print human-friendly error message on wrong modules orderKT-13792
Inner class of local class did not capture the enclosing class properlyKT-13912
NullPointerException at JsSourceGenerationVisitor when a Lambda with empty if block passed to inline functionKT-14535
Fix broken modification of captured variables defined by a destructuring declarationKT-14752
Fix exception while typing@JsName
annotation in editor- Update JavaScript platform declarations (DOM, Events, etc) to latest spec
- Types that exist in runtime are now generated as abstract classes while non-existing types are now interfaces
IDE
KT-14215
Show members of anonymous objects in File Structure windowKT-14217
Support visibility filters in File Structure window- Implement Kotlin facet
KT-13811
Expose JVM target setting in IntelliJ IDEA plugin compiler configuration UI
Issues fixed
KT-6535
"Go to Symbol" did not include Enum constantsKT-10700
Run tests via Gradle does not work for Kotlin sourcesKT-12385
Closing quote was not automatically inserted when typing Char literalKT-12445
Fix IllegalStateException in the class chooser if Kotlin script file existsKT-13279
Deleting<
in function call expression should delete matching>
KT-13795
Escaped chars in char literals was not highlightedKT-14411
Code folding did not work in lambdas after some declatationKT-14585
ConvertJavaCopyPasteProcessor showed a dialog under write actionKT-14741
Default JVM target was inferred to 1.8 for module with dependency on JDK 1.7KT-13354
Fix unstable resolve of value parameter types in IDE testsKT-13400
KDoc: Fully-qualified names were resolved incorrectlyKT-13197
KDoc: Code completion should suggest relevant identifiers for reference-value tagsKT-10665
KDoc: Do not show full KDoc popup on ctrl-hovering over declarationsKT-13038
Quick doc: HTML entities in code blocks should be escapedKT-13389
Quick Doc: Hyperlinks to properties and functions did nothingKT-7739
Quick Doc: Type names in should be navigableKT-7995
Quick Doc: ReplaceWith value should be shown for deprecated elementsKT-13197
Quick Doc: Markdown indented code blocks were not recognizedKT-11032
Quick Doc:@sample
was ignoredKT-13699
Quick documentation should show supertype docs for overridden Java methodsKT-14804
Avoid loading ast for decompiled filesKT-5897
PressingEnter
after binary operations places the caret at the wrong indentationKT-10828
Support empty Unit function formatting on one lineKT-15123
Do indent adjustment on the fly only for the first element in the lineKT-15128
Do not assign type parameters from original proto if type is substituted with Any
Inspections, Intentions and Quickfixes
KT-12095
Implement "Join Declaration and Assignment" intentionKT-12701
Add a quickfix for@JvmOverloads
on functions without default parameters, fix corresponding inspection rangeKT-14326
Implement Intention + Inspection to remove empty secondary constructor bodyKT-14521
Add Inspection to remove empty primary constructorKT-14569
Convert Property to Function Intention: Search occurrences using progress dialogKT-14501
Create from Usage: Support array access expressions/binary expressions with type mismatch errorsKT-14500
Create from Usage: Suggest functional type based on the call with lambda argument and unresolved invoke()KT-13259
"Redundant if statement" inspection: report also assignments (as done for Java)KT-13393
Implement intention to convert function reference to lambdaKT-12100
Add "Converttry-finally
touse
" intentionKT-14459
Initialize with Constructor Parameter: Fix IDE freeze on properties in generic classKT-14044
Fix exception on deleting unused declaration in IDEA 2016.3KT-14019
Create from Usage: Support generation of abstract members for superclassesKT-14246
Intentions: Convert function type parameter to receiverKT-14246
Intentions: Convert function type receiver to parameterKT-14729
Implement "Add names to call arguments" intentionKT-11760
Create from Usage: Support adding type parameters to the referenced type
Issues fixed
KT-14396
"Remove redundant.let
call" was not proposed for binary operationsKT-14552
ChangeParameterTypeFix held a strong reference to PSIKT-14745
Fix KotlinNullPointerException in ConvertPrimaryConstructorToSecondaryKT-14791
Fix incorrect "remove redundant.let
" inspection for value with smart castKT-14733
Fix incorrect intention to addout
/in
variance with inner classesKT-13777
Simplify condition intention should work in casebooleanCond == true
KT-14890
Inspection to remove curly braces from class definition should not trigger for nested classes followed by a secondary constructorKT-12633
Intention "Specify type explicitly" should offer all bounds for platform typesKT-14100
Auto-import should suggest Enum constantsKT-15087
Don't suggestsomething == true
simplification for flexible typesKT-14982
"Convert reference to lambda" worked incorrectly with static methodsKT-14985
"Convert reference to lambda" worked incorrectly withapply
KT-15028
Fix ClassCastException:KtParameter
cannot be cast toKtFunction
KT-14063
N...
1.1-M04
1.1-M04 (EAP-4)
Language related changes
KT-4481
compareTo on primitive floats/doubles should behave naturallyKT-11016
Allow to annotate internal API to be used inside public inline functionsKT-11128
Member vs SAM conversion with more specific signatureKT-12215
Allowing to access protected members in public inline members creates potential binary compatibility problemKT-12531
Report error when delegated member hides a supertype memberKT-14650
mod function on integral types is inconsistent with BigInteger.modKT-14651
Floating point comparisons shall operate according to IEEE754KT-14852
It should not be possible to use typealias that abbreviates a generic projection as a constructorKT-15226
Restrict delegation to java 8 default methods
Reflection
KT-12250
Provide API for getting a single annotation by its classKT-14939
VerifyError in accessors for bound property reference with receiver 'null'
Compiler
Coroutines
- Major coroutines redesign - see
KEEP
for details
Optimizations
KT-11734
Optimize const vals by inlining them at call siteKT-13570
Generate TABLE/LOOKUPSWITCH if all when branches are const integer valuesKT-14746
Captured Refs should not be volatile
Various issues
KT-10982
java.util.Map::compute* poor usabilityKT-12144
Type inference incorporation error on SAM adapter callKT-14196
Do not allow class literal with expression in annotation argumentsKT-14453
Regression: Type inference failed: inferred type is T but T was expectedKT-14774
Incorrect inner class modifier generated for sealed inner classesKT-14839
CompilationException when calling inline fun with first arg of 2 (w/defaults) within catch block of Java exception typeKT-14855
Projection in type aliases should be allowed in supertypes and constructor invocations if they expand to non-toplevel projectionsKT-14887
Unhelpful error "public-API inline function cannot access non-public-API" for unresolved call inside inline functionKT-14930
Android: creating Kotlin activity: UOE at EmptyList.removeAll()KT-15146
Kapt3 no source files on unittestKT-15272
Exception when building 2 projects at the same time
JavaScript backend
dynamic type
KT-8207
Extension function on dynamic resolves on any typeKT-6579
JS: prohibit to usein
and!in
on dynamicKT-6580
JS: prohibit to use more than one argument in indexed access on dynamicKT-13615
JS: don't generate guard for catch with dynamic type
@native/external
KT-13893
JS: Replace @Native annotation with external modifierKT-12877
Allow to specify module for native JS declarationsKT-14806
JS: name of a local variable clashes with native declaration from global scope
Diagnostics
KT-13889
JS: prohibit overriding native functions with default values assigned to parametersKT-13894
JS: prohibit native declaration inside non-nativeKT-13895
JS: RUNTIME annotationsKT-13896
JS: prohibit external(native) extension functions and propertiesKT-13897
JS: prohibit native(external) files and typealiasesKT-13910
JS: prohibit override members of native declaration with overloadsKT-14027
JS: prohibit native inner classesKT-14029
JS: prohibit private members inside native declarationsKT-14037
JS: prohibit using native interfaces in RHS of ISKT-14038
JS: warn when using native interface in RHS of ASKT-15130
JS: prohibit inheritance native from non-nativeKT-12600
JS: type check with a native interface compiles but crash at runtimeKT-13307
KotlinJS cannot cast to a marker interface.
Language features support
KT-13573
JS: support bound callable referenceKT-14634
JS: support enumValues / enumValueOfKT-15058
JS: replace suspend function convention
Issues related to kotlin.Any
KT-7664
JS: "x is Any" is always falseKT-7665
JS: creating Any instance crashes on runtimeKT-15131
JS: don't mangle Any.equals
Various issues
KT-14033
JS: don't optimize (based on type information) by default expressions with any of "as, is, !is, as?, ?., !!"KT-13616
JS: don't omit guard for catch with Throwable typeKT-12976
JS: human-friendly error message on wrong modules orderKT-15212
JS: link unqualified names injs(...)
function to local functions in outer Kotlin function by nameKT-14750
JS: remove unnecessary functions from kotlin.js
Bugfixes
KT-12566
JS: inner local class should refer to captured variables via its outer classKT-12527
Reified is-check works wrongly for chained callsKT-12586
JS: compiler crashes when call inline function inside string templeateKT-13164
Ecma TypeError on extending local class from inner oneKT-14888
JS: Compiler error: Cannot get FQ name of local class: lazy classKT-14748
JS: eliminate unused functionsKT-14999
JS: Operator set + labeled lambdasKT-15007
JS: Dies when checking if exception implements interface. TypeError: Cannot read property 'baseClasses' of undefinedKT-15073
KT to JS losing extension function's receiverKT-15169
JS: compiler fails on annotated expression with TRE at Translation.doTranslateExpression()KT-13522
JS: can't use captured reified type paramter in jsClassKT-13784
JS: lambda was not inlined for function with reified parameter declared in another moduleKT-13792
JS: inner class of local class does not capture enclosing class properlyKT-15327
JS: EnumvalueOf
should throw IllegalArgumentException
Standard library
KT-7930
Make String.toInt(), toLong(), etc. nullable instead of throwing exceptionKT-8220
Add #peek method to Sequence similar to Stream.peekKT-8286
Int.toString and String.toInt with base as parameterKT-14034
JS: unsafeCast functionKT-15181
Some source files are missing from published sources on Bintray
IDE
1.1-M03
1.1-M03 (EAP-3)
New language features
KT-2964
Underscores in integer literals
(see KEEP)KT-3824
Underscore in lambda for unused parameters
(see KEEP)KT-2783
Allow to skip some components in a multi-declaration
(see the same KEEP)KT-11551
limited scope for dsl writers
(see KEEP)
Compiler
Coroutines related issues
- Make fields for storing lambda parameters non-final (as they get assigned within
invoke
call) KT-14719
Make initial continuation able to be resumed with exceptionKT-14636
Coroutine fields should not be volatileKT-14718
Validate label value of coroutine in case of no suspension points
Typealises related issues
KT-13514
Type inference doesn't work with generic typealiasesKT-13837
Error "Type alias expands to T, which is not a class, an interface, or an object"
should also appear for local type aliasesKT-14307
Local recursive type alias should be an errorKT-14400
Compiler Error IllegalStateException: kotlin.NotImplementedError when anonymous
object inherits from typealiasKT-14377
Expected error: Modifier 'companion' is not applicable to 'typealias'KT-14498
typealias allows to circumvent variance annotationsKT-14641
An exception while processing a nested type alias access after a dot
Various issues
KT-550
Properties without initializer but with get must infer type from getterKT-8816
Generate Kotlin parameter names in the same form as expected for Java 8 reflectionKT-10569
Cannot iterate over values of an enum class when it is used as a generic parameter
(see KEEP)KT-13557
VerifyError with delegated local variable used in object expressionKT-13890
IllegalAccessError when invoking protected method with default argumentsKT-14012
Back-end (JVM) Internal error every first compilation after the source code changeKT-14201
UnsupportedOperationException: Don't know how to generate outer expression for anonymous
object with invoke and non-trivial closureKT-14318
Repeated annotations resulting from type alias expansion should be reportedKT-14347
Report UNUSED_PARAMETER/VARIABLE on named unused lambda parameters/destructuring entriesKT-14352
@SinceKotlin is not taken into account for companion object member referenced via
type aliasKT-14357
Try-catch used in false condition generates CompilationExceptionKT-14502
Prohibit irrelevant modifiers and annotations on destructured parameters in lambdaKT-14692
Change resolution scope for componentX in lambda parametersKT-14824
Back-end (JVM) Internal error: Couldn't inline method call 'get' into local final fun
StorageComponentContainer.(): kotlin.UnitKT-14798
Gradle 3.2 AssertionError: Built-in class kotlin.ParameterName is not found
JS
Feature support
KT-6985
Support Exceptions in JSKT-13574
JS: support coroutinesKT-14422
JS: Support destructuring in lambda parametersKT-14507
JS: allow to skip some components in a multi-declaration
Library updates
KT-14637
JS: Missing ArrayList.ensureCapacity
Other issues
KT-2328
js: kotlin exceptions must inherit ErrorKT-5537
Drop Cloneable in JSKT-7014
JS: generate code which more friendly to js tools (minifier, optimizer, linter etc)KT-8019
JS: no stackTrace in exception subclassesKT-10911
JS: Throwable properties aren't supported wellKT-13912
JS: Compiler NPE at JsSourceGenerationVisitor. Lambda with empty [if] block passed
to inline functionKT-14535
JS: Broken modification of captured variables defined by a destructuring declaration
Standard Library
-
KT-2084
Common API should be available without referring to java.* packagesNow those common types, which are supported on all platforms, are available in
kotlin.*
packages, and are imported by default. These include:ArrayList
,HashSet
,LinkedHashSet
,HashMap
,LinkedHashMap
inkotlin.collections
Appendable
andStringBuilder
inkotlin.text
Comparator
inkotlin.comparisons
On JVM these are just typealiases of the good old types fromjava.util
andjava.lang
-
KT-13554
Introduce bitwise operationsand
/or
/xor
/inv
for Byte and Short -
KT-13582
New platform-agnostic extensions for arrays:contentEquals
to compare arrays'
content for equality,contentHashCode
to get hashcode of array's content, andcontentToString
to get the string representation of array elements. -
KT-14510
Generic constraints ofArray.flatten
signature were relaxed a bit to make it just usable. -
KT-14789
ProvideKotlinVersion
class, which allows to get the current version of the standard
library and compare it with some otherKotlinVersion
value.
IDE
KT-14409
Incorrect "Variable can be declared immutable" inspection for local delegated variableKT-14431
Create quick-fix on UNUSED_PARAMETER/VARIABLE when it can be replaced with one underscoreKT-14794
Add /Specify type/Remove explicit type intentions for property with getters if type
can be inferredKT-14752
Exception while typing @JsName annotation in editor
Previous releases
This release also includes the fixes and improvements from releases 1.0.5-2
, 1.1-M01
and 1.1-M02
1.0.5-2
- Fixed compatibility with Android Studio 2.3 Canary
KT-14751
Fixed inability to resolve references to Java classes with type annotations on inner class or enum constructor parametersKT-14752
Fixed error when analyzing incomplete@JsName
annotationKT-14724
Kotlin code compiled to JavaScript with Gradle callsmain
function by default
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