Releases: JetBrains/kotlin
1.1.50
Android
KT-14800Kotlin Lint:@SuppressLintannotation on local variable is ignoredKT-16600False positive "For methods, permission annotation should specify one ofvalue,anyOforallOf"KT-16834Android Lint: Bogus warning on @SetParam:StringResKT-17785Kotlin Lint: "Incorrect support annotation usage" does not pick the value of const valKT-18837Android Lint: Collection.removeIf is not flagged when used on RealmListKT-18893Android support annotations (ColorInt, etc) cannot be used on properties: "does not apply for type void"KT-18997KLint: False positive "Could not find property setter method setLevel on java.lang.Object" if using elvis with return on RHSKT-19671UAST: Parameter annotations not provided for val parameters
Compiler
Performance Improvements
KT-17963Unnecessary boxing in case of primitive comparison to objectKT-18589'Equality check can be used instead of elvis' produces code that causes boxingKT-18693Optimize in-expression with optimizable range in RHSKT-18721Improve code generation for if-in-primitive-literal expression ('if (expr in low .. high)')KT-18818Optimize null cases inwhenstatement to avoid Intrinsics usageKT-18834Do not create ranges for 'x in low..high' where type of x doesn't match range element typeKT-19029Use specialized equality implementations for 'when'KT-19149Use 'for-in-until' loop in intrinsic array constructorsKT-19252Use 'for-in-until' loop for 'for-in-rangeTo' loops with constant upper bounds when possibleKT-19256Destructuring assignment generates redundant code for temporary variable nullificationKT-19457Extremely slow analysis for file with deeply nested lambdas
Fixes
KT-10754Bogus unresolved extension functionKT-11739Incorrect error message on getValue operator with KProperty parameterKT-11834INAPPLICABLE_LATEINIT_MODIFIER is confusing for a generic type parameter with nullable (default) upper boundKT-11963Exception: recursive call in a lazy value under LockBasedStorageManagerKT-12737Confusing error message when calling extension function with an implicit receiver, passing value parameter of wrong typeKT-12767Too much unnecessary information in "N type arguments expected" error messageKT-12796IllegalArgumentException on referencing inner class constructor on an outer class instanceKT-12899Platform null escapes if passed as an extension receiver to an inline functionKT-13665Generic componentN() functions should provide better diagnostics when type cannot be inferredKT-16223Confusing diagnostic for local inline functionsKT-16246CompilationException caused by intersection type overload and wrong type parameterKT-16746DslMarker doesn't work with typealiasesKT-17444Accessors generated for private file functions should respect @JvmNameKT-17464Calling super constructor with generic function call in arguments fails at runtimeKT-17725java.lang.VerifyError when both dispatch receiver and extension receiver have smart castsKT-17745Unfriendly error message on creating an instance of interface via typealiasKT-17748Equality for class literals of primitive types is not preserved by reificationKT-17879Comparing T::class from a reified generic with a Class<> and KClass<> variable in when statement is brokenKT-18356Argument reordering in super class constructor call for anonymous object fails with VerifyErrorKT-18819JVM BE treats 'if (a in low .. high)' as 'if (a >= low && a <= high)', so 'high' can be non-evaluatedKT-18855Convert "Remove at from annotation argument" inspection into compiler error & quick-fixKT-18858Exception within typealias expansion with dynamic used as one of type argumentsKT-18902NullPointerException when using provideDelegate with properties of the base class at runtimeKT-18940REPEATED_ANNOTATION is reported on wrong location for typealias argumentsKT-18944Type annotations are lost for dynamic typeKT-18966Report full package FQ name in compilation errors related to visibilityKT-18971Missing non-null assertion for platform type passed as a receiver to the member extension functionKT-18982NoSuchFieldError on access to imported object property from the declaring object itselfKT-18985Too large highlighting range for UNCHECKED_CASTKT-19058VerifyError: no CHECKAST on dispatch receiver of the synthetic property defined in Java interfaceKT-19100VerifyError: missing CHECKCAST on extension receiver of the extension propertyKT-19115Report warnings on usages of JSR 305-annotated declarations which rely on incorrect or missing nullability informationKT-19128java.lang.VerifyError with smart cast to String from AnyKT-19180Bad SAM conversion of Java interface causing ClassCastException: [...] cannot be cast to kotlin.jvm.functions.Function1KT-19205Poor diagnostic message for deprecated class referenced through typealiasKT-19367NSFE if property with name matching companion object property name is referenced within lambdaKT-19434Object inheriting generic class with a reified type parameter looses method annotationsKT-19475AnalyserException in case of combination ofwhile (true)+ stack-spilling (coroutines/try-catch expressions)KT-19528Compiler exception on inline suspend function inside a generic classKT-19575Deprecated typealias is not marked as such in access to companion objectKT-19601UPPER_BOUND_VIOLATED reported on type alias expansion in a recursive upper bound on a type parameterKT-19814Runtime annotations for open suspend function are not generated correctlyKT-19892Overriding remove method on inheritance from TreeSetKT-19910Nullability assertions removed when inlining an anonymous object in crossinline lambdaKT-19985JSR 305: nullability qualifier of Java function return type detected incorrectly in case of using annotation nickname
IDE
New Features
KT-6676Show enum constant ordinal in quick doc like in JavaKT-12246Kotlin source files are not highlighted in Gradle build output in IntelliJ
Performance Improvements
KT-19670When computing argument hints, don't resolve call if none of the arguments are unclear expressions
Fixes
KT-9288Call hierarchy ends on function call inside local val initializer expression- [
KT-9669](https://youtrack.jetbrains.com/is...
1.1.4-3
KT-18062SamWithReceiver compiler plugin not used by IntelliJ for .kt filesKT-18497Gradle Kotlin Plugin does not work with the gradle java-library pluginKT-19276Console spam when opening idea-community project in debug IDEAKT-19433[Coroutines + Kapt3] Assertion failed in ClassClsStubBuilder.createNestedClassStubKT-19680kapt3 & Parcelize: Compilation errorKT-19687Kotlin 1.1.4 noarg plugin breaks with sealed classesKT-19700Kapt error after updating to 1.1.4 - stub adds type parameters where there are noneKT-19713Mocking of final named suspend methods with mockito failsKT-19729kapt3: not always including argument to @javax.inject.Named in generated stubsKT-19759"Convert to expression body" is not shown in 162 / AS23 branches for multi-linersKT-19767NPE caused by Map<String, Boolean>?.getKT-19769PerModulePackageCacheService calls getOrderEntriesForFile() for every file, even those that can't affect Kotlin resolveKT-19774Provide an opt-out flag for separate classes directories (Gradle 4.0+)KT-19847if an imported library already exists it should be redetected during gradle import
1.1.4-2
KT-19679CompilationException: Couldn't inline method call 'methodName' into...KT-19690Lazy field in interface default method leads to ClassFormatErrorKT-19716QuickdocCtrl+Qbroken while browsing code completion listCtrl-SpaceKT-19717Library kind incorrectly detected for vertx-web in Kotlin projectKT-19723"Insufficient maximum stack size" during compilation
1.1.4
Android
New Features
KT-11048Android Extensions: cannot evaluate expression containing generated properties
Performance Improvements
KT-10542Android Extensions: No cache for ViewsKT-18250Android Extensions: Allow to use SparseArray as a View cache
Fixes
KT-11051Android Extensions: completion of generated properties is unclear for ambiguous idsKT-14086Android-extensions not generated using flavors dimensionKT-14912Lint: "Code contains STOPSHIP marker" ignores suppress annotationKT-15164Kotlin Lint: problems in delegate expression are not reportedKT-16934Android Extensions fails to compile when importing synthetic properties for layouts in other modulesKT-17641Problem with Kotlin Android Extensions and Gradle syntaxKT-17783Kotlin Lint: quick fixes to add inapplicable @RequiresApi and @SuppressLint make code incompilableKT-17786Kotlin Lint: "Surround with if()" quick fix is not suggested for single expressionget()KT-17787Kotlin Lint: "Add @TargetApi" quick fix is not suggested for top level property accessorKT-17788Kotlin Lint: "Surround with if()" quick fix corrupts code in case of destructuring declarationKT-17890[kotlin-android-extensions] Renaming layout file does not rename importKT-18012Kotlin Android Extensions generates@NotNullproperties for views present in a configuration and potentially missing in anotherKT-18545Accessing to synthetic properties on smart casted Android components crashed compiler
Compiler
New Features
KT-10942Support meta-annotations from JSR 305 for nullability qualifiersKT-14187Redundant "is" check is not detectedKT-16603Supportinline suspendfunctionKT-17585Generate state machine for named functions in their bodies
Performance Improvements
KT-3098Generate efficient comparisonsKT-6247Optimization for 'in' and '..'KT-7571Don't box Double instance to call hashCode on Java 8KT-9900Optimize range operations for 'until' extension from stdlibKT-11959Unnceessary boxing/unboxing due to Comparable.compareToKT-12158Optimize away boxing when comparing nullable primitive type value to primitive valueKT-13682Reuse StringBuilder for concatenation and string interpolationKT-14323IntelliJ lockup when using Apache Spark UDFKT-14375Kotlin compiler failure with spark when creating a flexible type for scala.Function22KT-15235Escaped characters in template strings are generating inefficient implementationsKT-17280Inline constant expressions in string templatesKT-17903Generate 'for-in-indices' as a precondition loopKT-18157Optimize out trivial INSTANCEOF checksKT-18162Do not check nullability assertions twice for effectively same valueKT-18164Do not check nullability for values that have been already checked with !!KT-18478Unnecessary nullification of bound variablesKT-18558Flatten nested string concatenationKT-18777Unnecessary boolean negation generated for 'if (expr !in range)'
Fixes
KT-1809Confusing diagnostics when wrong number of type arguments are specified and there are several callee candiatesKT-2007Improve diagnostics when + in not resolved on a pair of nullable intsKT-5066Bad diagnostic message for ABSTRACT_MEMBER_NOT_IMPLEMENTED for (companion) objectKT-5511Inconsistent handling of inner enumKT-7773Disallow to explicitly extend Enum classKT-7975Unclear error message when redundant type arguments suppliedKT-8340vararg in a property setter must be an errorKT-8612Incorrect error message for var extension property without getter or setterKT-8829Type parameter of a class is not resolved in the constructor parameter's default valueKT-8845Bogus diagnostic on infix operation "in"KT-9282Improve diagnostic on overload resolution ambiguity when a nullable argument is passed to non-null parameterKT-10045Not specific enough compiler error message in case of trying to call overloaded private methodsKT-10164Incorrect error message for external inline methodKT-10248Smart casts: Misleading error on overloaded function callKT-10657Confusing diagnostic when trying to invoke value as a functionKT-10839Weird diagnostics on callable reference of unresolved classKT-11119Confusing error message when overloaded method is called on nullable receiverKT-12408Generic information lost for override valuesKT-12551Report "unused expression" on unused bound double colon expressionsKT-13749Error highlighting range for no 'override' modifier is bigger than neededKT-14598Do not report "member is final and cannot be overridden" when overriding something from final classKT-14633"If must have both main and else branches" diagnostic range is too highKT-14647Confusing error message "'@receiver:' annotations could be applied only to extension function or extension property declarations"KT-14927TCE in QualifiedExpressionResolverKT-15243Report deprecation on usages of type alias expanded to a deprecated classKT-15804Prohibit having duplicate parameter names in functional typesKT-15810destructuring declarations don't work in scripts on the top levelKT-15931IllegalStateException: ClassDescriptor of superType should not be null: T by aKT-16016Compiler failure with NO_EXPECTED_TYPEKT-16448Inline suspend functions with inlined suspend invocations are miscompiled (VerifyError, ClassNotFound)KT-16576Wrong code generated with skynet benchmarkKT-17007Kotlin is not optimizing away unreachable code based on const valsKT-17188Do not propose to specify constructor invocation for classes without an accessible constructorKT-17611Unnecessary "Name shadowed" warning on parameter of local function or local class memberKT-17692NPE in compiler when calling KClass.java on function result of type UnitKT-17820False "useless cast" when target type is flexibleKT-17972Anonymous class generated from lambda captures its outer and tries to set nonexistent this$0 field.- [
KT-18029](https:...
1.2-M2
Compiler
Breaking change: Java-default method calls
Kotlin interface members overriding Java-default methods while targeting JVM 1.6 now produce an error on super calls requiring to be compiled with -jvm-target 1.8 option
Standard library
Revised windowed/pairwise operations
windowedfunction now has its step parameter defaulting to 1.
It also gets an additional optional parameterpartialWindows, which controls what to do with incomplete windows in the end. By default it is false, which means incomplete windows are dropped.pairwisefunction name was too confusing, it was unclear how it paired the elements together. Now it is calledzipWithNext, so it is more clear that each element is zipped with the next element in a collection.
Common math operations in the standard library
There was a longstanding request to support math operations in the standard library KT-4900. Until now one had to resort to math functions and constants from java.lang.Math class in JVM platform and to kotlin.js.Math which exposed native JS Math functions to Kotlin code in JS platform.
But now we're introducing the following groups of API in the kotlin.math package:
- constants:
PIandE; - trigonometric:
cos,sin,tanand inverse of them:acos,asin,atan,atan2; - hyperbolic:
cosh,sinh,tahn; - exponentation:
pow(an extension function),sqrt,hypot,exp,expm1; - logarithms:
log,log2,log10,ln,ln1p; - rounding:
-ceil,floor,truncate,round(half to even) functions;
-roundToInt,roundToLong(half to integer) extension functions; - sign and absolute value:
-absandsignfunctions;
-absoluteValueandsignextension properties;
-withSignextension function; maxandminof two values;- binary representation:
-ulpextension property;
-nextUp,nextDown,nextTowardsextension functions;
-toBits,toRawBits,Double.fromBits(these are in thekotlinpackage).
Previous releases
This release also includes fixes and improvements from 1.2-M1 and 1.1.4-eap-54 releases
1.1.3-2
- Noarg compiler plugin reverted to 1.1.2 behavior: by default, it will not run any initialization code
from the generated default constructor. If you want to run initializers, you need to enable
the corresponding option as described in the documentation.
Note that if a @noarg class has initializers that depend on constructor parameters, you will get incorrect
compiler behavior, so you shouldn't enable this option if you have such classes in your project.
This resolvesKT-18667andKT-18668. KT-18689Incorrect bytecode generated when passing a bound member reference to an inline function with default argument valuesKT-18377Syntax error while generating kapt stubsKT-18411Slow debugger step-in into inlined functionKT-18687Deadlock in resolve with Kotlin 1.1.3KT-18726Frequent UI hangs in 2017.2 EAPs
1.2-M1
1.2-M1
Language changes
- Array literals, which can be used in annotation arguments
Compiler
KT-6884KT-17910Support default values for functional parameters in inline functionsKT-15894Change the way how singleton objects are initialized in order not to contradict JVM specKT-17929Illegal smart cast was allowed after assignment in try block
Standard Library
-
KT-8823MutableList.fillextension -
KT-9010MutableList.shuffleandList.shuffledextensions -
KEEP-11KT-9151KT-10021KT-11026
chunkedandwindowed: extension functions to support
partitioning collections into blocks of the given size and
taking a window of the given size and moving it along the collection with the given step.pairwiseextension to get all subsequent pairs in collection -
KEEP-49Additional operations and conversion extensions forBigIntegerandBigDecimal -
KT-16447Makekotlin.text.Regexclass serializable
IDE
KT-17164Intention to convert*arrayOf()functions to array literals in annotations
JS
- Typed arrays are turned on by default
Previous releases
This release also includes the fixes and improvements from
1.1.3 release.
1.1.3
1.1.3
Android
New Features
KT-12049Kotlin Lint: "Missing Parcelable CREATOR field" could suggest "Add implementation" quick fixKT-16712Show warning in IDEA when using Java 1.8 api in AndroidKT-16843Android: provide gutter icons for resources like colors and drawablesKT-17389Implement Intention "Add Activity / BroadcastReceiver / Service to manifest"KT-17465Add intentions Add/Remove/Redo parcelable implementation
Fixes
KT-14970ClassCastException: butterknife.lint.LintRegistry cannot be cast to com.android.tools.klint.client.api.IssueRegistryKT-17287Configure kotlin in Android Studio: don't show menu Choose Configurator with single choiceKT-17288Android Studio: please remove menu item Configure Kotlin (JavaScript) in ProjectKT-17289Android Studio: Hide "Configure Kotlin" balloon if Kotlin is configured from a kt file bannerKT-17291Android Studio 2.4: Cannot get property 'metaClass' on null object error after Kotlin configuringKT-17610"Unknown reference: kotlinx"
Compiler
New Features
KT-11167Support compilation against JRE 9KT-17497Warn about redundant else branch in exhaustive when
Performance Improvements
KT-7931Optimize iteration over strings/charsequences on JVMKT-10848Optimize substitution of inline function with default parametersKT-12497Optimize inlined bytecode for functions with default parametersKT-17342Optimize control-flow for case of many variablesKT-17562Optimize KtFile::isScript
Fixes
KT-4960Redeclaration is not reported for type parameters of interfacesKT-5160No warning when a lambda parameter hides a variableKT-5246is check fails on cyclic type parameter boundsKT-5354Wrong label resolution when label name clash with fun nameKT-7645Prohibit default value forcatch-block parameterKT-7724Can never import private memberKT-7796Wrong scope for default parameter value resolutionKT-7984Unexpected "Unresolved reference" in a default value expression in a local functionKT-7985Unexpected "Unresolved reference to a type parameter" in a default value expression in a local functionKT-8320It should not be possible to catch a type parameter typeKT-8877Automatic labeling doesn't work for infix callsKT-9251Qualified this does not work with labeled function literalsKT-9551False warning "No cast needed"KT-9645Incorrect inspection: No cast NeededKT-9986'null as T' should be unchecked castKT-10397java.lang.reflect.GenericSignatureFormatError when generic inner class is mentioned in function signatureKT-11474ISE: Requested A, got foo.A in JavaClassFinderImpl on Java file with package not matching directoryKT-11622False "No cast needed" when ambiguous call because of smart castKT-12245Code with annotation that has an unresolved identifier as a parameter compiles successfullyKT-12269False "Non-null type is checked for instance of nullable type"KT-12683A problem withisoperator and non-reified type-parametersKT-12690USELESS_CAST compiler warning may break code when fix is appliedKT-13348Report useless cast on safe cast from nullable type to the same not null typeKT-13597No check for accessing final field in local object in constructorKT-13997Incorrect "Property must be initialized or be abstract" error for property with external accessorsKT-14381Possible val reassignment not detected inside init blockKT-14564java.lang.VerifyError: Bad local variable typeKT-14801Invoke error message if nested class has the same name as a function from base classKT-14977IDE doesn't warn about checking null value of variable that cannot be nullKT-15085Label and function naming conflict is resolved in unintuitive wayKT-15161False warning "no cast needed" for array creationKT-15480Cannot destruct a list when "if" has an "else" branchKT-15495Internal typealiases in the same module are inaccessible on incremental compilationKT-15566Object member imported in file scope used in delegation expression in object declaration should be a compiler errorKT-16016Compiler failure with NO_EXPECTED_TYPEKT-16426Return statement resolved to function instead of property getterKT-16813Anonymous objects returned from private-in-file members should behave as for private class membersKT-16864Local delegate + ad-hoc object leads to CCEKT-17144Breakpoint insidewhenKT-17149Incorrect warning "Kotlin: This operation has led to an overflow"KT-17156No re-parse after lambda was converted to blockKT-17318Typo in DSL Marker messagecantKT-17384break/continue expression in inlined function parameter argument causes compilation exceptionKT-17457Suspend + LongRange couldn't transform method node issue in Kotlin 1.1.1KT-17479val reassign is allowed via explicit this receiverKT-17560Overload resolution ambiguity on semi-valid class-files generated by ScalaKT-17572try-catch expression in inlined function parameter argument causes compilation exceptionKT-17573try-finally expression in inlined function parameter argument fails with VerifyErrorKT-17588Compiler error while optimizer tries to get rid of captured variableKT-17590conditional return in inline function parameter argument causes compilation exceptionKT-17591non-conditional return in inline function parameter argument causes compilation exceptionKT-17613'this' expression referring to deprecated class instance is highlighted as deprecated in IDEKT-18358Keep smart pointers instead of PSI elements in JavaElementImpl and its descendants
IDE
New Features
KT-7810Separate icon for abstract classKT-8617Recognize TODO method usages and highlight them same as TODO-commentKT-12629Add rainbow/semantic-highlighting for local variablesKT-14109support parameter hints in idea pluginKT-16645Support inlay type hints for implicitly typed vals, properties, and functions- [
KT-17807](https://youtrack...
1.1.2-5
1.1.2-5
KT-18026Fixed regression with coroutine support in 1.1.2-4- Fix for the Databinding issue where the kapt task started too early, not letting the Databinding pre-process the project
- Add support for com.android.feature plugin
- Fix UnsupportedOperationException caused by mutation of FileCollection in Gradle builds
1.1.2-4
- Compatibility with Android Build Tools 3.0.0-alpha1 and Android Studio 3.0 Canary 1
1.1.2-3
KT-17596Fixed display of compilation errors in Android Studio