kotlin icon indicating copy to clipboard operation
kotlin copied to clipboard

The Kotlin Programming Language.

Results 310 kotlin issues
Sort by recently updated
recently updated
newest added

Strings: Add add{Prefix,Suffix}() extension functions

[{"_id":"6320400f0bb258509c49b5c7","body":"Related issue: https:\/\/youtrack.jetbrains.com\/issue\/KT-19805","issue_id":1660110095065,"origin_id":377936774,"user_origin_id":4257577,"create_time":1522678062,"update_time":1522678062,"id":1663057935150,"updated_at":"2022-09-13T08:32:15.150000Z","created_at":"2022-09-13T08:32:15.150000Z"},{"_id":"6320400f0bb258509c49b5c8","body":"@ilya-g what does it take to accept this PR? Do I need to add implementations for all other platforms Kotlin supports?","issue_id":1660110095065,"origin_id":644743553,"user_origin_id":349154,"create_time":1592312031,"update_time":1592312031,"id":1663057935154,"updated_at":"2022-09-13T08:32:15.154000Z","created_at":"2022-09-13T08:32:15.154000Z"},{"_id":"6320400f0bb258509c49b5c9","body":"Any update @ilya-g?","issue_id":1660110095065,"origin_id":798958058,"user_origin_id":349154,"create_time":1615747488,"update_time":1615747488,"id":1663057935159,"updated_at":"2022-09-13T08:32:15.159000Z","created_at":"2022-09-13T08:32:15.159000Z"},{"_id":"66156f636c617b7b5008205b","body":"Closing this due to a lack of feedback.","issue_id":1660110095065,"origin_id":1727858115,"user_origin_id":349154,"create_time":1695220481,"update_time":1695220481,"id":1712680803649,"updated_at":"2024-04-09T16:40:03.649000Z","created_at":"2024-04-09T16:40:03.649000Z"}] comment

This is for symmetry with the existing remove{Prefix,Suffix}() functions.

Standard Library

Atomicfu compiler plugin for JS/IR backend

[{"_id":"6320400f0bb258509c49b5ca","body":"It looks good enough. The two biggest concerns I have are cast to implementation and using FunctionDescriptor. I believe both of them could be fixed. ","issue_id":1660110095070,"origin_id":637039493,"user_origin_id":37534597,"create_time":1591037284,"update_time":1591037284,"id":1663057935515,"updated_at":"2022-09-13T08:32:15.514000Z","created_at":"2022-09-13T08:32:15.514000Z"},{"_id":"6320400f0bb258509c49b5cb","body":"From my perspective PR looks good beside one mirror remark. I would like someone from build infra team (@4u7 maybe) take a look. If there is no concern I am good to merge it. ","issue_id":1660110095070,"origin_id":639356560,"user_origin_id":37534597,"create_time":1591348041,"update_time":1591348124,"id":1663057935518,"updated_at":"2022-09-13T08:32:15.517000Z","created_at":"2022-09-13T08:32:15.517000Z"}] comment

Provide samples for isDefined function KT-20357

[{"_id":"6320400f0bb258509c49b5cc","body":"@ruckustboom do you mind reviewing my pr?\r\n","issue_id":1660110095077,"origin_id":791572982,"user_origin_id":11150412,"create_time":1614965833,"update_time":1614965833,"id":1663057935839,"updated_at":"2022-09-13T08:32:15.839000Z","created_at":"2022-09-13T08:32:15.839000Z"},{"_id":"6320400f0bb258509c49b5cd","body":"I'm just some random dude from the community who happened to stumble across your last PR one day and thought I might have something to add. I'm not really one to call on for reviews.\r\n\r\nIn general, unless your PR is directly related to the work of a specific person, it's probably not a great idea to call anyone out at all. ","issue_id":1660110095077,"origin_id":791594512,"user_origin_id":1735659,"create_time":1614968165,"update_time":1614968414,"id":1663057935843,"updated_at":"2022-09-13T08:32:15.843000Z","created_at":"2022-09-13T08:32:15.843000Z"}] comment

This is my first commit to Kotlin library. Please review and provide feedback to if I'm meeting the guidelines. If so, I will provide more samples for the std library.

Standard Library Sample

KT-21392 Fix the description of `MutableMap.getOrPut()`

[{"_id":"6320404aa863905a9f4d0342","body":"Wouldn't the more appropriate fix be to change the *implementation* to match the documentation? As I believe the documented behavior also is the behavior most developers would expect.","issue_id":1660110095081,"origin_id":395533134,"user_origin_id":349154,"create_time":1528398801,"update_time":1528398801,"id":1663057994447,"updated_at":"2022-09-13T08:33:14.447000Z","created_at":"2022-09-13T08:33:14.447000Z"},{"_id":"6320404aa863905a9f4d0343","body":"@sschuberth: Yes, fixing the implementation would be my preferred fix, too, but I had doubts if it would be accepted as it is a potentially breaking change.","issue_id":1660110095081,"origin_id":395543007,"user_origin_id":2741977,"create_time":1528400920,"update_time":1528400920,"id":1663057994452,"updated_at":"2022-09-13T08:33:14.451000Z","created_at":"2022-09-13T08:33:14.451000Z"},{"_id":"6320404aa863905a9f4d0344","body":"In this case, I wouldn't regard it as a breaking change (i.e. you're not changing docs & implementation to behave differently than before), but a bug fix to make the implementation match the documentation (and desired behavior).","issue_id":1660110095081,"origin_id":395547643,"user_origin_id":349154,"create_time":1528401919,"update_time":1528401919,"id":1663057994454,"updated_at":"2022-09-13T08:33:14.454000Z","created_at":"2022-09-13T08:33:14.454000Z"},{"_id":"6320404aa863905a9f4d0345","body":"This surprised me today! Good thing I usually read implementations and not just docs...","issue_id":1660110095081,"origin_id":582038081,"user_origin_id":16724,"create_time":1580839311,"update_time":1580839311,"id":1663057994458,"updated_at":"2022-09-13T08:33:14.458000Z","created_at":"2022-09-13T08:33:14.458000Z"},{"_id":"6320404aa863905a9f4d0346","body":"Any news about this? This has been open for over two years now!\r\n(Mind you, I personally agree that the documentation is correct and the implementation is buggy, so I'd much rather see the implementation fixed. But if the designers of Kotlin don't agree, then at the very least the documentation should reflect what the functions actually do!)","issue_id":1660110095081,"origin_id":722503000,"user_origin_id":14250097,"create_time":1604595278,"update_time":1604595278,"id":1663057994462,"updated_at":"2022-09-13T08:33:14.462000Z","created_at":"2022-09-13T08:33:14.462000Z"},{"_id":"6320404aa863905a9f4d0347","body":"Can we please get this merged? This just fixes the docs to match the implementation, so it's *not* a breaking change.\r\n\r\nWhile I'd personally prefer to actually change the implementation, that's certainly not going to happen any time soon. In any case, docs and implementation should stay aligned.","issue_id":1660110095081,"origin_id":780135107,"user_origin_id":349154,"create_time":1613511639,"update_time":1613511639,"id":1663057994465,"updated_at":"2022-09-13T08:33:14.465000Z","created_at":"2022-09-13T08:33:14.465000Z"},{"_id":"66157c5f23eede2dcf0453ff","body":"As this has been fixed as part of another PR, I'm going to close this PR. Thanks for your input!","issue_id":1660110095081,"origin_id":1658263374,"user_origin_id":81160244,"create_time":1690805970,"update_time":1690805970,"id":1712684127860,"updated_at":"2024-04-09T17:35:27.860000Z","created_at":"2024-04-09T17:35:27.860000Z"}] comment

Make clear that the `defaultValue` is also called if the key is present in the map but the value is `null`. See: [KT-21392](https://youtrack.jetbrains.com/issue/KT-21392) If you like this change I can...

Standard Library

Use AGP support for Kotlin sources when it is available

[{"_id":"6320404aa863905a9f4d0348","body":"\/\/cc @h0tk3y ","issue_id":1660110095083,"origin_id":775395873,"user_origin_id":3955778,"create_time":1612813413,"update_time":1612813413,"id":1663057994808,"updated_at":"2022-09-13T08:33:14.807000Z","created_at":"2022-09-13T08:33:14.807000Z"}] comment

This change introduces support for Kotlin source directories when they specified in AGP. Please note this this feature is not yet available in the released AGP, but adding suport in...

Gradle Plugin

Avoid running call checkers when possible

[{"_id":"6320404ba863905a9f4d0349","body":"Ohh! This is ancient history! Thank you for pointing it out! Unfortunately I'm not in the context right now. \r\n\r\n@KirpichenkovPavel or @vladimirdolzhenko could you please take a look?\r\nMy fear is that binding context with such resolution results could be incorreclty cached somewhere in IDE caches. \r\n\r\nP.s. AFAIK the commit affects only IDE, because compiler wants diagnostic, i.e. wantsDiagnostics() returns true for compiler.","issue_id":1660110095089,"origin_id":758765096,"user_origin_id":1935285,"create_time":1610468042,"update_time":1610468042,"id":1663057995137,"updated_at":"2022-09-13T08:33:15.137000Z","created_at":"2022-09-13T08:33:15.137000Z"},{"_id":"6320404ba863905a9f4d034a","body":"True, I agree this may be risky if the results could be cached.\r\nI assume this code will be obsolete anyway when FIR lands, so feel free to close the pull request as \"not worth the risk\".","issue_id":1660110095089,"origin_id":773634904,"user_origin_id":6290395,"create_time":1612476454,"update_time":1612476454,"id":1663057995141,"updated_at":"2022-09-13T08:33:15.141000Z","created_at":"2022-09-13T08:33:15.141000Z"}] comment

Commit d8b0c7aaec added an optimization: call checkers are not invoked if BindingTrace.wantsDiagnostics() returns false. However, the optimization was never applied to KotlinToResolvedCallTransformer, which was introduced around the same time in...

Compiler

JVM: do not erase Array<T> if T is reified

[{"_id":"6320404ba863905a9f4d034b","body":"Yes, this is a breaking change, so it needs to be described according to the [template](https:\/\/kotlinlang.org\/foundation\/submitting-incompatible-changes.html) and approved by the committee.\r\n\r\nAlso, the new behavior should be implemented under a `LanguageFeature` so that we'd only enable it in a major release, and there would be a way to revert to the old behavior.","issue_id":1660110095090,"origin_id":768253917,"user_origin_id":292714,"create_time":1611750610,"update_time":1611750610,"id":1663057995484,"updated_at":"2022-09-13T08:33:15.484000Z","created_at":"2022-09-13T08:33:15.484000Z"},{"_id":"6320404ba863905a9f4d034c","body":"https:\/\/youtrack.jetbrains.com\/issue\/KT-44646","issue_id":1660110095090,"origin_id":770749860,"user_origin_id":1849909,"create_time":1612175230,"update_time":1612175230,"id":1663057995488,"updated_at":"2022-09-13T08:33:15.487000Z","created_at":"2022-09-13T08:33:15.487000Z"}] comment

inline fun Any?.foo() = this is Array should be equivalent to inline fun Any?.foo2() = this is T inline fun Any?.foo() = foo2() but right now it isn't. (Does this...

Backend

NI: don't use constraints with StubType when determining type variable readiness

[{"_id":"6320404ba863905a9f4d034d","body":"Hi @KirpichenkovPavel \r\n\r\nThis draft attempts to postpone adding (improper) type constraints for stub types, which is part of builder inference, and is able to unmute a bb test as well as identify incorrectly resolved references. However, it has a couple regressions: https:\/\/teamcity.jetbrains.com\/buildConfiguration\/Kotlin_KotlinForGoogle_AggregateBranch\/3266636?buildTab=tests&status=failed but I wonder if it's worth digging into further, i.e., this is the right direction to resolve [KT-42591](https:\/\/youtrack.jetbrains.com\/issue\/KT-42591). Your early input would be really appreciated, thanks!\r\n\r\nCc'ed @demiurg906 as it is about FIR builder inference.","issue_id":1660110095094,"origin_id":758150216,"user_origin_id":1486291,"create_time":1610391022,"update_time":1610391022,"id":1663057995833,"updated_at":"2022-09-13T08:33:15.833000Z","created_at":"2022-09-13T08:33:15.833000Z"},{"_id":"6320404ba863905a9f4d034e","body":"@PetukhovVictor can you please take a look? There are changes in common part of inferences between two frontends","issue_id":1660110095094,"origin_id":758529392,"user_origin_id":14974409,"create_time":1610443986,"update_time":1610443986,"id":1663057995837,"updated_at":"2022-09-13T08:33:15.836000Z","created_at":"2022-09-13T08:33:15.836000Z"}] comment

#KT-42591 Fixed

Compiler
FIR