Skip to content

Releases: JetBrains/kotlin

1.1

01 Mar 12:03
Compare
Choose a tag to compare
1.1

Compiler exceptions

  • KT-16411 Exception from compiler when try to inline callable reference to class constructor inside object
  • KT-16412 Exception from compiler when try call SAM constructor where argument is callable reference to nested class inside object
  • KT-16413 When we create sam adapter for java.util.function.Function we add incorrect null-check for argument

Standard library

  • KT-6561 Drop java.util.Collections package from js stdlib
  • javaClass extension property is no more deprecated due to migration problems

IDE

  • KT-16329 Inspection "Calls to staic methods in Java interfaces..." always reports warning undependent of jvm-target

1.0.7

15 Mar 17:55
Compare
Choose a tag to compare

Compiler

Analysis & diagnostics

  • KT-12044 Assertion "Rewrite at slice LEXICAL_SCOPE" for 'if' with property references
  • KT-13859 Wrong error about using unrepeatable annotation when mix implicit and explicit targets
  • KT-14376 ClassCastException from object with vals
  • KT-15464 Regression: compilation error "Supertypes of the following classes cannot be resolved..."
  • KT-15334 Incorrect compilation error "val cannot be reassigned" inside do-while
  • KT-15995 Do not report error on libraries that bundle Kotlin runtime in classpath
  • KT-16272 Unreported deprecation on variables called as functions
  • Some warnings are now reported even if there are compilation errors
  • Add hint to use "-language-version", when applicable

JVM backend

  • KT-15473 Invalid KFunction byte code signature for callable references

IDE

Issues fixed

  • KT-13001 "Go to Type Declaration" is broken for stdlib types
  • KT-15329 Regex is not inspected properly for Java character classes
  • KT-15448 Kotlin facet adds the same sub-elements into pluginClasspaths element inside .iml on every Maven synchronization

Inspections, Intentions and Quickfixes

  • KT-6217 Add inspection for unused equals expression
  • KT-5045 Add intention to convert between two comparisons and range check and vice versa
  • KT-15564 Add quickfix for changing primitive cast to primitive conversion method
Issues fixed
  • KT-15227 "Replace if with elvis operator" silently changes semantics
  • KT-14889 "Replace if with elvis operator" produces red code when result is referenced in 'if'
  • KT-13593 Do not report "Right operand of elvis operator (?:) is useless if it is null" for left argument with platform type
  • KT-15501 Incorrect "Add names to call arguments" when the only argument is a trailing lambda
  • KT-14630 Improve diagnostic message for platform type inspection
  • KT-15412 "Join declaration and assignment" can break code with smart casts
  • KT-14815 "Add import" does not work with constructor reference is not working
  • KT-15141 Bogus import popup for when function call cannot be resolved fully
  • KT-14745 NPE in "Convert primary constructor to secondary"
  • KT-15406 "Convert to secondary constructor" for enum class should put new members after enum values

Debugger

Issues fixed
  • KT-15282 Debugger does not hit breakpoints in crossinline lambdas on Android

Android support

Issues fixed
  • KT-14358 Kotlin extensions: rename layout file: Throwable: "PSI and index do not match"
  • KT-14920 Kotlin Lint: "Android Lint for Kotlin | Incorrect support annotation usage" inspection does not report problems

Tools

Gradle

  • KT-15218 Fix compatibility with Gradle 3.2+ distributions by isolating compiler process
  • KT-13275 Support compiling with Jack&Jill enabled (Android)
  • KT-16003 The project does not build after copy/move

Kapt

Issues fixed
  • KT-15814 Regression: Kapt is not working in 1.0.6
Experimental kapt
  • KT-15433 Kapt error messages are not being displayed in the console when compilation fails
  • KT-15459 Kapt doesn't generate code in test module
  • KT-15841 Kapt fails to build the project with StackOverflowError
  • KT-15838 KaptError: Java file parsing error
  • KT-15675 Support using kapt with Java-only projects
  • KT-15803 Generate enum values with bodies properly
  • KT-15915 Fix annotation processors writing to classes dir with kapt
  • KT-15524 Error messages should display associated element information (if available)
  • KT-15697 Annotation with AnnotationTarget.PROPERTY on a Kotlin property breaks annotation processing
  • KT-16146 Kapt doesn't work in verbose mode
  • KT-16153 Kapt does not properly escape valid kotlin names when generating stub java classes
  • KT-16176 Kapt reports a lot of false positive errors

1.1-RC

17 Feb 08:45
Compare
Choose a tag to compare
1.1-RC Pre-release
Pre-release

Reflection

  • KT-16358 Incompatibility between kotlin-reflect 1.0 and kotlin-stdlib 1.1 fixed

Compiler

Coroutine support

  • KT-15938 Changed error message for calling suspend function outside of suspendable context
  • KT-16092 Backend crash fixed: "Don't know how to generate outer expression" for destructuring suspend lambda
  • KT-16093 Annotations are retained during reading the binary representation of suspend functions
  • KT-16122 java.lang.VerifyError fixed in couroutines: (String, null, suspend () -> String)
  • KT-16124 Marked as UNSUPPORTED: suspension points in default parameters
  • KT-16219 Marked as UNSUPPORTED: suspend get/set, in/!in operators for
  • KT-16145 Beta-2 coroutine regression fixed (wrong code generation)

Kapt3

  • KT-15524 Fix javac error reporting in Kotlin daemon
  • KT-15721 JetBrains nullability annotations are now returned from Element.getAnnotationMirrors()
  • KT-16146 Fixed work in verbose mode
  • KT-16153 Ignore declarations with illegal Java identifiers
  • KT-16167 Fixed compilation error with kapt arguments in build.gradle
  • KT-16170 Stub generator now adds imports for corrected error types to stubs
  • KT-16176 javac's finalCompiler log is now used to determine annotation processing errors

Backward compatibility

  • KT-16017 More graceful error message for disabled features
  • KT-16073 Improved backward compatibility mode with version 1.0 on JDK dependent built-ins
  • KT-16094 Compiler considers API availability when compiling language features requiring runtime support
  • KT-16171 Fixed regression "Unexpected container error on Kotlin 1.0 project"
  • KT-16199 Do not import "kotlin.comparisons.*" by default in language version 1.0 mode

Various issues

  • KT-16225 enumValues non-reified stub implementation references nonexistent method no more
  • KT-16291 Smart cast works now when getting class of instance
  • KT-16380 Show warning when running the compiler under Java 6 or 7

JavaScript backend

  • KT-16144 Fixed inlining of functions called through inheritor ("fake" override) from another module
  • KT-16158 Error is not reported now when library path contains JAR file without JS metadata, report warning instead
  • KT-16160 Companion object dispatch receiver translation fixed

Standard library

  • KT-7858 Add extension function takeUnless
  • javaClass extension property is deprecated, use instance::class.java instead
  • Massive deprecations are coming in JS standard library in kotlin.dom and kotlin.dom.build packages

IDE

Configuration issues

  • KT-15899 Kotlin facet: language and api version for submodule setup for 1.0 are filled now as 1.0 too
  • KT-15914 Kotlin facet works now with multi-selected modules in Project Settings too
  • KT-15954 Does not suggest to configure kotlin for the module after each new kt-file creation
  • KT-16157 freeCompilerArgs are now imported from Gradle into IDEA
  • KT-16206 Idea no more refuses to compile a kotlin project defined as a maven project
  • KT-16312 Kotlin facet: import from gradle: don't import options which are set implicitly already
  • KT-16325 Kotlin facet: correct configuration after upgrading the IDE plugin
  • KT-16345 Kotlin facet: detect JavaScript if the module has language 1.0 kotlin-js-library dependency

Coroutine support

  • KT-16109 Error fixed: The -Xcoroutines can only have one value
  • KT-16251 Fix detection of suspend calls containing extracted parameters

Intention actions, inspections and quick-fixes

2017.1 compatibility
  • KT-15870 "Package name does not match containing directory" inspection: fixed throwable "AWT events are not allowed inside write action"
  • KT-15924 Create Test action: fixed throwable "AWT events are not allowed inside write action"
Bug fixes
  • KT-14831 Import statement and FQN are not added on converting lambda to reference for typealias
  • KT-15545 Inspection "join with assignment" does not change now execution order for properties
  • KT-15744 Fix: intention to import sleep wrongly suggests Thread.sleep
  • KT-16000 Inspection "join with assignment" handles initialization with 'this' correctly
  • KT-16009 Auto-import for JDK classes in .kts files
  • KT-16104 Don't insert modifiers (e.g. suspend) before visibility

Completion

  • KT-16076 Completion does not insert more FQN kotlin.text.String
  • KT-16088 Completion does not insert more FQN for kotlin package
  • KT-16110 Keyword 'suspend' completion inside generic arguments
  • KT-16243 Performance enhanced after variable of type ArrayList

Various issues

  • KT-15291 'Find usages' now does not report property access as usage of getter method in Java class with parameter
  • KT-15647 Exception fixed: KDoc link to member of class from different package and module
  • KT-16071 IDEA deadlock fixed: when typing "parse()" in .kt file
  • KT-16149 Intellij Idea 2017.1/Android Studio 2.3 beta3 and Kotlin plugin 1.1-beta2 deadlock fixed

Coroutine libraries

  • KT-15716 Introduced startCoroutineUninterceptedOrReturn coroutine intrinsic
  • KT-15718 createCoroutine now returns safe continuation
  • KT-16155 Introduced createCoroutineUnchecked intrinsic

Gradle support

  • KT-15829 Gradle Kotlin JS plugin: removed false "Duplicate source root:" warning for kotlin files
  • KT-15902 JS: gradle task output is now considered as source set output
  • KT-16174 Error fixed during IDEA-Gradle synchronization for Kotlin JS
  • KT-16267 JS: fixed regression in 1.1-beta2 for multi-module gradle project
  • KT-16274 Kotlin JS Gradle unexpected compiler error / absolute path to output file
  • KT-16322 Circlet project Gradle import issue fixed

REPL

  • KT-15861 Use windows line separator in kotlin's JSR implementation
  • KT-16126 Proper jvmTarget for REPL compilation

Kotlin 1.1-Beta2

02 Feb 17:46
Compare
Choose a tag to compare
Kotlin 1.1-Beta2 Pre-release
Pre-release

Language related changes

  • KT-7897 Do not require to call enum constructor for each entry if all parameters have default values
  • KT-8985 Support T::class.java for T with no non-null upper bound
  • KT-10711 Type inference works now on generics for callable references
  • KT-13130 Support exhaustive when for sealed trees
  • KT-15898 Cannot use type alias to qualify enum entry
  • KT-16061 Smart type inference on callable references in 1.1 mode only

Reflection

  • KT-8384 Access to the delegate object for a KProperty

Compiler

Coroutine support

  • KT-15016 VerifyError with coroutine: fix processing of uninitialized instances
  • KT-15527 Coroutine compile error: wrong code generated for safe qualified suspension points
  • KT-15552 Accessor implementation of suspended function produces AbstractMethodError
  • KT-15715 Coroutine generate invalid invoke
  • KT-15820 Coroutine Internal Error regression with dispatcher + this@
  • KT-15821 Coroutine internal error regression: Could not inline method call apply
  • KT-15824 Coroutine iterator regression: Object cannot be cast to java.lang.Boolean
  • KT-15827 Show Kotlin Bytecode shows wrong bytecode for suspending functions
  • KT-15907 Bogus error about platform declaration clash with private suspend functions
  • KT-15933 Suspend getValue/setValue/provideDelegate do not work properly
  • KT-15935 Private suspend function in file causes UnsupportedOperationException: Context does not have a "this"
  • KT-15963 Coroutine: runtime error if returned object "equals" does not like comparison to SUSPENDED_MARKER
  • KT-16068 Prohibit inline lambda parameters of suspend function type

Diagnostics

  • KT-1560 Report diagnostic for a declaration of extension function which will be always shadowed by member function
  • KT-12846 Forbid vararg of Nothing
  • KT-13227 NO_ELSE_IN_WHEN in when by sealed class instance if is-check for base sealed class is used
  • KT-13355 Type mismatch on inheritance is not reported on abstract class
  • KT-15010 Missing error on an usage of non-constant property in annotation default argument
  • KT-15201 Compiler is complaining about when statement without null condition even if null is checked before.
  • KT-15736 Report an error on type alias expanded to a nullable type on LHS of a class literal
  • KT-15740 Report error on expression of a nullable type on LHS of a class literal
  • KT-15844 Do not allow to access primary constructor parameters from property with custom getter
  • KT-15878 Extension shadowed by member should not be reported for infix/operator extensions when member is non-infix/operator
  • KT-16010 Do not highlight lambda parameters as unused in 1.0 compatibility mode

Kapt

  • KT-15675 Kapt3 does not generate classes annotated with AutoValue
  • KT-15697 If an annotation with AnnotationTarget.PROPERTY is tagged on a Kotlin property, it breaks annotation processing
  • KT-15803 Kotlin 1.0.6 broke Dagger
  • KT-15814 Regression: Kapt is not working in 1.0.6 / 1.1-M04 / 1.1-Beta
  • KT-15838 kapt3 1.1-beta: KaptError: Java file parsing error
  • KT-15841 1.1-Beta + kapt3 fails to build the project with StackOverflowError
  • KT-15915 Kapt: Kotlin class target directory is cleared before compilation (and after kapt task)
  • KT-16006 Cannot determine if type is an error type during annotation processing

Exceptions / Errors

  • KT-8264 Internal compiler error: java.lang.ArithmeticException: BigInteger: modulus not positive
  • KT-14547 NoSuchElementException when compiling callable reference without stdlib in the classpath
  • KT-14966 Regression: VerifyError on access super implementation from delegate
  • KT-15017 Throwing exception in the end of inline suspend-functions lead to internal compiler error
  • KT-15439 Resolved call is not completed for generic callable reference in if-expression
  • KT-15500 Exception passing freeCompilerArgs to gradle plugin
  • KT-15646 InconsistentDebugInfoException when stepping over throw
  • KT-15726 Kotlin compiles invalid bytecode for nested try-catch with return
  • KT-15743 Overloaded Kotlin extensions annotates wrong parameters in java
  • KT-15868 NPE when comparing nullable doubles for equality
  • KT-15995 Can't build project with DataBinding using Kotlin 1.1: incompatible language version
  • KT-16047 Internal Error: org.jetbrains.kotlin.util.KotlinFrontEndException while analyzing expression

Type inference issues

  • KT-10268 Wrong type inference related to captured types
  • KT-11259 Wrong type inference for Java 8 Stream.collect.
  • KT-12802 Type inference failed when irrelevant method reference is used
  • KT-12964 Support type inference for callable references from parameter types of an expected function type

Smart cast issues

  • KT-13468 Smart cast is broken after assignment of 'if' expression
  • KT-14350 Make smart-cast work as it does in 1.0 when -language-version 1.0 is used
  • KT-14597 When over smartcast enum is broken and breaks all other "when"
  • KT-15792 Wrong smart cast after y = x, x = null, y != null sequence

Various issues

  • KT-15236 False positive: Null can not be a value of a non-null type
  • KT-15677 Modifiers and annotations are lost on a (nullable) parenthesized type
  • KT-15707 IDEA unable to parallel compile different projects
  • KT-15734 Nullability is lost during expansion of a type alias
  • KT-15748 Type alias constructor return type should have a corresponding abbreviation
  • KT-15775 Annotations are lost on value parameter types of a function type
  • KT-15780 Treat Map.getOrDefault overrides in Java the same way as in 1.0.x compiler with language version 1.0
  • KT-15794 Refine backward compatibility mode for additional built-ins members from JDK
  • KT-15848 Implement additional annotation processing in the KotlinScriptDefinitionFromAnnotatedTemplate for SamWithReceiver plugin
  • KT-15875 Operation has lead to overflow for 'mod' with negative first operand
  • KT-15945 Feature Request: Andrey Breslav to grow a beard.

JavaScript backend

Coroutine support

  • KT-15834 JS: Local delegate in suspend function
  • KT-15892 JS: safe call of suspend functions causes compiler to crash

Diagnostics

  • KT-14668 Do not allow declarations in 'kotlin' package or subpackages in JS
  • KT-15184 JS: prohibit .. ope...
Read more

Kotlin 1.1-Beta

19 Jan 09:19
Compare
Choose a tag to compare
Kotlin 1.1-Beta Pre-release
Pre-release

Reflection

  • KT-15540 findAnnotation returns T?, but it throws NoSuchElementException when there is no matching annotation
  • Reflection API in kotlin-reflect library is moved to kotlin.reflect.full package, declarations in the package kotlin.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 function
  • KT-15380 Support suspend function type with value parameters
  • KT-15391 Prohibit suspend function type in supertype list
  • KT-15392 Prohibit local suspending function
  • KT-15413 Override regular functions with suspending ones and vice versa
  • KT-15657 Refine dispatchResume convention
  • KT-15662 Prohibit callable references to suspend functions

Diagnostics

  • KT-9630 Cannot create extension function on intersection of types
  • KT-11398 Possible false positive for INACCESSIBLE_TYPE
  • KT-13593 Do not report USELESS_ELVIS_RIGHT_IS_NULL for left argument with platform type
  • KT-13859 Wrong error about using unrepeatable annotation when mix implicit and explicit targets
  • KT-14179 Prohibit to use enum entry as type parameter
  • KT-15097 Inherited platform declarations clash: regression under 1.1 when indirectly inheriting from java.util.Map
  • KT-15287 Kotlin runtime 1.1 and runtime 1.0.x: Overload resolution ambiguity
  • KT-15334 Incorrect "val cannot be reassigned" inside do-while
  • KT-15410 "Protected function call from public-API inline function" for protected constructor call

Kapt3

  • KT-15145 Kapt3: Doesn't compile with multiple errors
  • KT-15232 Kapt3 crash due to java codepage
  • KT-15359 Kapt3 exception while annotation processing (DataBindings AS2.3-beta1)
  • KT-15375 Kapt3 can't find ${env.JDK_18}/lib/tools.jar
  • KT-15381 Unresolved references: R with Kapt3
  • KT-15397 Kapt3 doesn't work with databinding
  • KT-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 names
  • KT-15459 Kapt3 doesn't generate code in test module
  • KT-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 argument
  • KT-12044 Assertion "Rewrite at slice LEXICAL_SCOPE" for 'if' with property references
  • KT-14011 Compiler crash when inlining: lateinit property allRecapturedParameters has not been initialized
  • KT-14868 CCE in runtime while converting Number to Char
  • KT-15364 VerifyError: Bad type on operand stack on ObserverIterator.hasNext
  • KT-15373 Internal error when running TestNG test
  • KT-15437 VerifyError: Bad local variable type on simplest provideDelegate
  • KT-15446 Property reference on an instance of subclass causes java.lang.VerifyError
  • KT-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 call
  • KT-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 function
  • KT-11969 ProGuard issue with private interface methods
  • KT-12795 Write information about sealed class inheritors to metadata
  • KT-13718 ClassFormatError on aspectj instrumentation
  • KT-14162 Support @InlineOnly on inline properties
  • KT-14705 Inconsistent smart casts on when enum subject
  • KT-14917 No way to pass additional java command line options to kontlinc on Windows
  • KT-15112 Compiler hangs on nested lock compilation
  • KT-15225 Scripts: generate classes with names that are valid Java identifiers
  • KT-15411 Unnecessary CHECKCAST bytecode when dealing with null
  • KT-15473 Invalid KFunction byte code signature for callable references
  • KT-15582 Generated bytecode is sometimes incompatible with Java 9
  • KT-15584 Do not mark class files compiled with a release language version as pre-release
  • KT-15589 Upper bound for T in KClass can be implicitly violated using generic function
  • KT-15631 Compiler hang in MethodAnalyzer.analyze() fixed

JavaScript backend

Coroutine support

  • KT-15362 JS: Regex doesn't work (properly) in coroutine
  • KT-15366 JS: error when calling inline function with optional parameters from another module inside coroutine lambda
  • KT-15367 JS: for against iterator with suspend next and hasNext functions does not work
  • KT-15400 suspendCoroutine is missing in JS BE
  • KT-15597 Support non-tail suspend calls inside named suspend functions
  • KT-15625 JS: return statement without value surrounded by try..finally in suspend lambda causes compiler error
  • KT-15698 Move coroutine intrinsics to kotlin.coroutine.intrinsics package

Diagnostics

  • KT-14577 JS: do not report declaration clash when common redeclaration diagnostic applies
  • KT-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 all
  • KT-15590 Support increment on inlined properties

Native / external

  • KT-8081 JS: native inherited class shouldn't require super or primary constructor call
  • KT-13892 JS: restrictions for native (external) functions and properties
  • KT-15307 JS: prohibit inline members inside external declarations
  • KT-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 error
  • KT-15325 JS: ReferenceError: $receiver is not defined
  • KT-15357 JS: when expression in primary-from-secondary constructor call
  • KT-15435 Call to 'synchronize' crashes JS backend
  • KT-15513 JS: empty do..while loop crashes compiler

Various issues

Read more

Kotlin 1.0.6

27 Dec 16:17
Compare
Choose a tag to compare

Compiler

  • KT-12224 Add a diagnostic message for @JvmOverloads on interface methods
  • KT-14186 Vararg parameters were generated as simple array parameters for Java
  • KT-12664 Inner class was not found when a sub-directory with the same name is present in an outer class directory
  • KT-14408 No-arg constructor should always be generated if all primary constuctor arguments have a default value
  • KT-14469 StackOverflowError at EffectiveVisibilityKt.forVisibility
  • KT-14581 NullPointerException at StackTransformationUtils when inlining extension function to a do-while loop condition
  • KT-14678 Internal error with @JvmOverloads on constructor of inner class
  • KT-14751 Class can't be resolved (related to annotation on types)
  • KT-14774 Incorrect inner class modifier was generated for sealed 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 order
  • KT-13792 Inner class of local class did not capture the enclosing class properly
  • KT-13912 NullPointerException at JsSourceGenerationVisitor when a Lambda with empty if block passed to inline function
  • KT-14535 Fix broken modification of captured variables defined by a destructuring declaration
  • KT-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 window
  • KT-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 constants
  • KT-10700 Run tests via Gradle does not work for Kotlin sources
  • KT-12385 Closing quote was not automatically inserted when typing Char literal
  • KT-12445 Fix IllegalStateException in the class chooser if Kotlin script file exists
  • KT-13279 Deleting < in function call expression should delete matching >
  • KT-13795 Escaped chars in char literals was not highlighted
  • KT-14411 Code folding did not work in lambdas after some declatation
  • KT-14585 ConvertJavaCopyPasteProcessor showed a dialog under write action
  • KT-14741 Default JVM target was inferred to 1.8 for module with dependency on JDK 1.7
  • KT-13354 Fix unstable resolve of value parameter types in IDE tests
  • KT-13400 KDoc: Fully-qualified names were resolved incorrectly
  • KT-13197 KDoc: Code completion should suggest relevant identifiers for reference-value tags
  • KT-10665 KDoc: Do not show full KDoc popup on ctrl-hovering over declarations
  • KT-13038 Quick doc: HTML entities in code blocks should be escaped
  • KT-13389 Quick Doc: Hyperlinks to properties and functions did nothing
  • KT-7739 Quick Doc: Type names in should be navigable
  • KT-7995 Quick Doc: ReplaceWith value should be shown for deprecated elements
  • KT-13197 Quick Doc: Markdown indented code blocks were not recognized
  • KT-11032 Quick Doc: @sample was ignored
  • KT-13699 Quick documentation should show supertype docs for overridden Java methods
  • KT-14804 Avoid loading ast for decompiled files
  • KT-5897 Pressing Enter after binary operations places the caret at the wrong indentation
  • KT-10828 Support empty Unit function formatting on one line
  • KT-15123 Do indent adjustment on the fly only for the first element in the line
  • KT-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" intention
  • KT-12701 Add a quickfix for @JvmOverloads on functions without default parameters, fix corresponding inspection range
  • KT-14326 Implement Intention + Inspection to remove empty secondary constructor body
  • KT-14521 Add Inspection to remove empty primary constructor
  • KT-14569 Convert Property to Function Intention: Search occurrences using progress dialog
  • KT-14501 Create from Usage: Support array access expressions/binary expressions with type mismatch errors
  • KT-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 lambda
  • KT-12100 Add "Convert try-finally to use" intention
  • KT-14459 Initialize with Constructor Parameter: Fix IDE freeze on properties in generic class
  • KT-14044 Fix exception on deleting unused declaration in IDEA 2016.3
  • KT-14019 Create from Usage: Support generation of abstract members for superclasses
  • KT-14246 Intentions: Convert function type parameter to receiver
  • KT-14246 Intentions: Convert function type receiver to parameter
  • KT-14729 Implement "Add names to call arguments" intention
  • KT-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 operations
  • KT-14552 ChangeParameterTypeFix held a strong reference to PSI
  • KT-14745 Fix KotlinNullPointerException in ConvertPrimaryConstructorToSecondary
  • KT-14791 Fix incorrect "remove redundant .let" inspection for value with smart cast
  • KT-14733 Fix incorrect intention to add out/in variance with inner classes
  • KT-13777 Simplify condition intention should work in case booleanCond == true
  • KT-14890 Inspection to remove curly braces from class definition should not trigger for nested classes followed by a secondary constructor
  • KT-12633 Intention "Specify type explicitly" should offer all bounds for platform types
  • KT-14100 Auto-import should suggest Enum constants
  • KT-15087 Don't suggest something == true simplification for flexible types
  • KT-14982 "Convert reference to lambda" worked incorrectly with static methods
  • KT-14985 "Convert reference to lambda" worked incorrectly with apply
  • KT-15028 Fix ClassCastException: KtParameter cannot be cast to KtFunction
  • KT-14063 N...
Read more

1.1-M04

21 Dec 17:38
Compare
Choose a tag to compare
1.1-M04 Pre-release
Pre-release

1.1-M04 (EAP-4)

Language related changes

  • KT-4481 compareTo on primitive floats/doubles should behave naturally
  • KT-11016 Allow to annotate internal API to be used inside public inline functions
  • KT-11128 Member vs SAM conversion with more specific signature
  • KT-12215 Allowing to access protected members in public inline members creates potential binary compatibility problem
  • KT-12531 Report error when delegated member hides a supertype member
  • KT-14650 mod function on integral types is inconsistent with BigInteger.mod
  • KT-14651 Floating point comparisons shall operate according to IEEE754
  • KT-14852 It should not be possible to use typealias that abbreviates a generic projection as a constructor
  • KT-15226 Restrict delegation to java 8 default methods

Reflection

  • KT-12250 Provide API for getting a single annotation by its class
  • KT-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 site
  • KT-13570 Generate TABLE/LOOKUPSWITCH if all when branches are const integer values
  • KT-14746 Captured Refs should not be volatile

Various issues

  • KT-10982 java.util.Map::compute* poor usability
  • KT-12144 Type inference incorporation error on SAM adapter call
  • KT-14196 Do not allow class literal with expression in annotation arguments
  • KT-14453 Regression: Type inference failed: inferred type is T but T was expected
  • KT-14774 Incorrect inner class modifier generated for sealed inner classes
  • KT-14839 CompilationException when calling inline fun with first arg of 2 (w/defaults) within catch block of Java exception type
  • KT-14855 Projection in type aliases should be allowed in supertypes and constructor invocations if they expand to non-toplevel projections
  • KT-14887 Unhelpful error "public-API inline function cannot access non-public-API" for unresolved call inside inline function
  • KT-14930 Android: creating Kotlin activity: UOE at EmptyList.removeAll()
  • KT-15146 Kapt3 no source files on unittest
  • KT-15272 Exception when building 2 projects at the same time

JavaScript backend

dynamic type

  • KT-8207 Extension function on dynamic resolves on any type
  • KT-6579 JS: prohibit to use in and !in on dynamic
  • KT-6580 JS: prohibit to use more than one argument in indexed access on dynamic
  • KT-13615 JS: don't generate guard for catch with dynamic type

@native/external

  • KT-13893 JS: Replace @Native annotation with external modifier
  • KT-12877 Allow to specify module for native JS declarations
  • KT-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 parameters
  • KT-13894 JS: prohibit native declaration inside non-native
  • KT-13895 JS: RUNTIME annotations
  • KT-13896 JS: prohibit external(native) extension functions and properties
  • KT-13897 JS: prohibit native(external) files and typealiases
  • KT-13910 JS: prohibit override members of native declaration with overloads
  • KT-14027 JS: prohibit native inner classes
  • KT-14029 JS: prohibit private members inside native declarations
  • KT-14037 JS: prohibit using native interfaces in RHS of IS
  • KT-14038 JS: warn when using native interface in RHS of AS
  • KT-15130 JS: prohibit inheritance native from non-native
  • KT-12600 JS: type check with a native interface compiles but crash at runtime
  • KT-13307 KotlinJS cannot cast to a marker interface.

Language features support

  • KT-13573 JS: support bound callable reference
  • KT-14634 JS: support enumValues / enumValueOf
  • KT-15058 JS: replace suspend function convention

Issues related to kotlin.Any

  • KT-7664 JS: "x is Any" is always false
  • KT-7665 JS: creating Any instance crashes on runtime
  • KT-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 type
  • KT-12976 JS: human-friendly error message on wrong modules order
  • KT-15212 JS: link unqualified names in js(...) function to local functions in outer Kotlin function by name
  • KT-14750 JS: remove unnecessary functions from kotlin.js

Bugfixes

  • KT-12566 JS: inner local class should refer to captured variables via its outer class
  • KT-12527 Reified is-check works wrongly for chained calls
  • KT-12586 JS: compiler crashes when call inline function inside string templeate
  • KT-13164 Ecma TypeError on extending local class from inner one
  • KT-14888 JS: Compiler error: Cannot get FQ name of local class: lazy class
  • KT-14748 JS: eliminate unused functions
  • KT-14999 JS: Operator set + labeled lambdas
  • KT-15007 JS: Dies when checking if exception implements interface. TypeError: Cannot read property 'baseClasses' of undefined
  • KT-15073 KT to JS losing extension function's receiver
  • KT-15169 JS: compiler fails on annotated expression with TRE at Translation.doTranslateExpression()
  • KT-13522 JS: can't use captured reified type paramter in jsClass
  • KT-13784 JS: lambda was not inlined for function with reified parameter declared in another module
  • KT-13792 JS: inner class of local class does not capture enclosing class properly
  • KT-15327 JS: Enum valueOf should throw IllegalArgumentException

Standard library

  • KT-7930 Make String.toInt(), toLong(), etc. nullable instead of throwing exception
  • KT-8220 Add #peek method to Sequence similar to Stream.peek
  • KT-8286 Int.toString and String.toInt with base as parameter
  • KT-14034 JS: unsafeCast function
  • KT-15181 Some source files are missing from published sources on Bintray

IDE

  • KT-14693 Introduce Type Alias: Do not suggest type qualifiers
  • KT-14696 Introduce Type Alias: Fix NPE during dialog repaint
  • [`KT-14685...
Read more

1.1-M03

25 Nov 10:26
Compare
Choose a tag to compare
1.1-M03 Pre-release
Pre-release

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 exception
  • KT-14636 Coroutine fields should not be volatile
  • KT-14718 Validate label value of coroutine in case of no suspension points

Typealises related issues

  • KT-13514 Type inference doesn't work with generic typealiases
  • KT-13837 Error "Type alias expands to T, which is not a class, an interface, or an object"
    should also appear for local type aliases
  • KT-14307 Local recursive type alias should be an error
  • KT-14400 Compiler Error IllegalStateException: kotlin.NotImplementedError when anonymous
    object inherits from typealias
  • KT-14377 Expected error: Modifier 'companion' is not applicable to 'typealias'
  • KT-14498 typealias allows to circumvent variance annotations
  • KT-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 getter
  • KT-8816 Generate Kotlin parameter names in the same form as expected for Java 8 reflection
  • KT-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 expression
  • KT-13890 IllegalAccessError when invoking protected method with default arguments
  • KT-14012 Back-end (JVM) Internal error every first compilation after the source code change
  • KT-14201 UnsupportedOperationException: Don't know how to generate outer expression for anonymous
    object with invoke and non-trivial closure
  • KT-14318 Repeated annotations resulting from type alias expansion should be reported
  • KT-14347 Report UNUSED_PARAMETER/VARIABLE on named unused lambda parameters/destructuring entries
  • KT-14352 @SinceKotlin is not taken into account for companion object member referenced via
    type alias
  • KT-14357 Try-catch used in false condition generates CompilationException
  • KT-14502 Prohibit irrelevant modifiers and annotations on destructured parameters in lambda
  • KT-14692 Change resolution scope for componentX in lambda parameters
  • KT-14824 Back-end (JVM) Internal error: Couldn't inline method call 'get' into local final fun
    StorageComponentContainer.(): kotlin.Unit
  • KT-14798 Gradle 3.2 AssertionError: Built-in class kotlin.ParameterName is not found

JS

Feature support

  • KT-6985 Support Exceptions in JS
  • KT-13574 JS: support coroutines
  • KT-14422 JS: Support destructuring in lambda parameters
  • KT-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 Error
  • KT-5537 Drop Cloneable in JS
  • KT-7014 JS: generate code which more friendly to js tools (minifier, optimizer, linter etc)
  • KT-8019 JS: no stackTrace in exception subclasses
  • KT-10911 JS: Throwable properties aren't supported well
  • KT-13912 JS: Compiler NPE at JsSourceGenerationVisitor. Lambda with empty [if] block passed
    to inline function
  • KT-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.* packages

    Now 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 in kotlin.collections
    • Appendable and StringBuilder in kotlin.text
    • Comparator in kotlin.comparisons
      On JVM these are just typealiases of the good old types from java.util and java.lang
  • KT-13554 Introduce bitwise operations and/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, and contentToString to get the string representation of array elements.

  • KT-14510 Generic constraints of Array.flatten signature were relaxed a bit to make it just usable.

  • KT-14789 Provide KotlinVersion class, which allows to get the current version of the standard
    library and compare it with some other KotlinVersion value.

IDE

  • KT-14409 Incorrect "Variable can be declared immutable" inspection for local delegated variable
  • KT-14431 Create quick-fix on UNUSED_PARAMETER/VARIABLE when it can be replaced with one underscore
  • KT-14794 Add /Specify type/Remove explicit type intentions for property with getters if type
    can be inferred
  • KT-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

15 Nov 15:21
Compare
Choose a tag to compare
  • 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 parameters
  • KT-14752 Fixed error when analyzing incomplete @JsName annotation
  • KT-14724 Kotlin code compiled to JavaScript with Gradle calls main function by default

1.0.5

08 Nov 16:21
Compare
Choose a tag to compare

Compiler

  • KT-10210 Annotation written before a block-level expression now applies to the entire expression, not to its first prefix
  • KT-13565 Remove net/sf/cglib/core/* classes from compiler jars
  • KT-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 classifiers
  • KT-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 classes
  • KT-11263 Refine diagnostic about type arguments for an outer class
  • KT-12238, KT-10627 Fix inference when captured type is used as a lambda parameter type
  • KT-13950 Fix false positive "Cannot capture" error reporting
  • KT-13381, KT-13396 Prevent generation of delegations to interfaces private methods
  • KT-13295 Add warning for redundant lateinit modifier
  • KT-13952, KT-13005 Prohibit return type mismatch for delegation members
  • KT-8154 Fix AssertionError when delegating base interface and implementing derived interface
  • KT-13969 Fix VerifyError for do-while, continue and a condition in a local variable
  • KT-14025 Fix CCE in OverloadResolver.findRedeclarations
  • KT-14147 Report error on declaring 'getClass' in class or package
  • KT-14146 Fix detection of accidental overrides with synthetic bridge
  • KT-14188 Do not generate mutable collection stubs for Kotlin-only signatures
  • KT-14195 Write generic signature for autogenerated toArray
  • KT-13698 Optimize method count for collection stubs
  • KT-14243 Fix wrong invocation descriptor on calling implicitly generated implementation in class
  • KT-11585 Fix "Cannot pop operand off an empty stack" exception when accessing @JvmStatic property
  • KT-14242 Fix runtime exception on array?.size
  • Forbid use of expressions to the left of ::class
  • KT-13926 Report error on usages of classes deprecated with DeprecationLevel.HIDDEN
  • KT-14298 Add -api-version command line option
  • KT-5044 Generate more efficient bytecode for in on ranges with double, float and long element type
  • KT-14357 Fixed CompilationException in case of try-catch used in false condition
  • KT-14012 Fixed internal error on every first compilation after the source code change
  • KT-14304 Fixed inconsistent reporting of 'variable must be initialized' after assignment
    in anonymous object
  • KT-14158 Fixed possible exception thrown when reporting unreachable code diagnostics
  • KT-7929, KT-8442 Fixed various exceptions caused by trying to use destructuring declarations outside of a code block
  • KT-14447 Fixed compiler exception if a value was changed but not used
  • KT-14201 Fixed compiler exception for anonymous object with invoke and non-trivial closure
  • KT-13890 Fixed incorrect bytecode generation causing IllegalAccessError at runtime for invoking protected method with default arguments
  • KT-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 Kotlin
  • KT-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 entries
  • KT-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 expression
  • KT-4519 Show first line for folded block comments
  • KT-5193 Multiline strings are now foldable
  • KT-13473 Structure view now shows local functions
  • KT-11775 Added icons for class initializers
  • KT-11776 Primary constructor members are shown in Project view when "Show members" is enabled
  • KT-13326 Speed search is now enabled in add import popup
  • KT-3363 Support "Surround with if" for expressions
  • KT-13927 exception Fixed on adding second inner class when there is a usage in Java of the first one
  • KT-9009 Support for auto-import of Java static methods
  • Improved performance for Find Usages of convention functions
  • KT-13643 Support for Find Usages of invoke operator method
  • KT-13605 Find Usages no longer fails to find usages of component function defined in Java
  • KT-13953 Import member popup no longer suggests methods when only property or variable is valid
  • KT-9019, KT-10178 Improved display of structure when "Group by file structure" is enabled
  • KT-13475 Show context when invoking Show Implementations from Find Usages popup
  • KT-13140 "Copy Reference" now copies JVM name of class or method to clipboard
  • KT-10095 Support "Show expression type" in variable declaration position
  • KT-10588 Show smart cast information in "Show expression type"
  • KT-11310, KT-8803 Use short names in Show Expression Type
  • KT-11640 Optimize imports prevents accidental changes in resolve because of import priorities
  • KT-13976 Search Everywhere: Render function parameter types
  • KT-13977 Search Everywhere: Render extension type in prefix position
  • KT-12966 Fixed possible deadlock in IDE
  • KT-13136 Reduced plugin memory usage on projects with large number of modules
  • KT-13861 Correct Parameter Info for SAM adapters
  • KT-13981, KT-5117 Add indent before colon of super types list on new line
  • KT-7718 Fixed indent in constructor delegate call
  • KT-13584 Fixed IDE misbehavior (exceptions, index corruption) after Java to Kotlin conversion
  • KT-12402 Fixed resolve of databinding
    classes inside the IDE
  • KT-14131 Formatter now removes spaces in labeled expressions
  • KT-14327 Allow to select single word on double click in one line doc comment
  • [KT-14452](https://youtrack.jetbrains.com/issue/KT-14452...
Read more