Commit Graph

101686 Commits

Author SHA1 Message Date
Abduqodiri Qurbonzoda 0bef1533e2 Improve documentation of collection constructors #KT-59192 2023-06-08 12:41:40 +00:00
Yahor Berdnikau 2f7ae074f0 [Maven] Fix configured remote repositories that are not participating in compiler plugin artifacts resolve
^KT-58978 Fixed


Co-authored-by: Yahor Berdnikau <egorr.berd@gmail.com>

Merge-request: KT-MR-10519
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2023-06-08 12:26:59 +00:00
Ivan Kylchik f74fd947b3 [JVM_IR] Don't add synthetic accessor when processing function reference
The issue appeared after code refactoring. Originally we didn't
save generated accessor for symbols in `IrFunctionReference`. These
symbols will be processed in their own turn.

#KT-59079 Fixed
2023-06-08 11:13:50 +00:00
Pavel Kunyavskiy 456783436c [K/N] Fix cast to NativePtr mis-compilation
^KT-59022
2023-06-08 10:40:29 +00:00
Nataliya.Valtman af05f4c201 KT-58662 Fix build reports for Gradle 8.1 with Configuration Cache 2023-06-08 10:07:35 +00:00
Egor Kulikov f2f979134d [FIR] Change diagnostic INITIALIZER_TYPE_MISMATCH to work with for loop
^KTIJ-25251 fixed


Merge-request: KT-MR-10507
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2023-06-08 09:40:09 +00:00
Denis.Zharkov 7087ba3ca9 FIR2IR: Minor. Move withContainingFirClass to convertClassContent
As it's anyway is being called each time
2023-06-08 08:04:03 +00:00
Denis.Zharkov c474c54903 FIR2IR: Fix IAE for case of local override of a method with defaults
It was happening because for MyClass.foo we didn't set overriddenSymbols
properly because in ClassMemberGenerator.convertFunctionContent we
used incorrect containingFirClass that was pointing to anonymous class
instead of MyClass.

^KT-58902 Fixed
2023-06-08 08:04:03 +00:00
Alexander Korepanov b04848d179 [JS IR] Drop pirLowerings lowering list 2023-06-08 07:31:43 +00:00
Anna Kozlova 983d319a6b [AA] fe10 symbols adjusted to be used in goto type declaration
- try to find sources for decompiled symbols in IDE mode
- function literals can't be declared as extensions,
though there target can contain that indication,
let's take what descriptor provides
2023-06-07 21:46:49 +00:00
Anna Kozlova 86bed92a46 [AA] ensure psi files from stdlib do not leak 2023-06-07 21:00:26 +00:00
Anna Kozlova 4d97e4c572 [LL] add tests for FirDeclarationForCompiledElementSearcher
build stub if was not able to load:
expected that in IDE stubs would always be found in the index, for tests -
build from virtual file
2023-06-07 21:00:26 +00:00
Timofey Solonin bc306844af [MPP] Replace obsolete linuxArm32Hfp with mingwX64 in CommonizerIT test for KT-48138
^KT-48138
^KT-58822
2023-06-07 19:27:02 +00:00
Timofey Solonin 4cb90aed52 [MPP] Remove obsolete target from CommonizerIT test for KT-47641
^KT-47641
^KT-58822
2023-06-07 18:45:01 +00:00
Nikolay Lunyak 5daec16ce0 [FIR] Forbid creating abstract class instances via any qualified access
^KT-58938 Fixed
2023-06-07 16:45:28 +00:00
aleksandrina-streltsova fccb391f31 [AA] Renderer: enable rendering name without symbol
^KTIJ-22404
2023-06-07 16:22:28 +00:00
Timofey.Solonin 928c590599 [MPP] Remove obsolete targets from KotlinTargetHierarchyDslTest
and add missing assertions for the targets that are not checked

^KT-58822
2023-06-07 15:20:05 +00:00
Brian Norman 63a327808c [Test] Update FIR diagnostic rendering 2023-06-07 15:19:42 +00:00
Timofey Solonin f27ca23000 [MPP][Gradle] Replace obsolete linuxArm32Hfp target with mingwX64 in MppCInteropDependencyTransformationIT.KT50952
^KT-50952
^KT-58822
2023-06-07 15:19:14 +00:00
Pavel Kunyavskiy 15e5adf2b5 Mark reflection related tests as jvm-only 2023-06-07 14:59:38 +00:00
Denis.Zharkov 69a6339935 K2: Add test for obsolete KT-51793
^KT-51793 Fixed
2023-06-07 14:49:22 +00:00
Dmitriy Novozhilov c745ef09d1 [FIR] Move check for INSTANCE_ACCESS_BEFORE_SUPER_CALL from resolution stage to checker
^KT-48870
2023-06-07 14:33:33 +00:00
Yahor Berdnikau 4a501a257e [Gradle] Restore Kapt import compatibility with older Kotlin plugin releases
Still supported IDEA/Kotlin plugin releases relies on
'kotlin-annotation-processing-gradle' artifact name in compiler plugins
classpath. I've restored this publication usage until we will stop
support Kotlin plugin versions that doesn't know about
'kotlin-annotation-processing-embeddable' name.

^KTIJ-25586 Fixed
2023-06-07 13:21:57 +00:00
Nikolay Lunyak 97adb01600 [FIR Native] Don't add Cloneable supertype when it's not present
^KT-58549 Fixed
2023-06-07 13:03:02 +00:00
Sebastian Sellmair a80d6a7b74 [Gradle] Ide Dependency Resolution: Filter 'loop' or 'self' dependencies
Those are dependencies that point back to the original project.
This can happen with two projects like

```
// project a
kotlin {
    commonMain.get().dependencies {
        api(project(":b"))
    }
}

// project b
kotlin {
    commonTest.get().dependencies {
        implementation(project(":a"))
    }
}
```

Where b(test) -> a -> b

^KT-59020 Verification Pending
2023-06-07 12:38:54 +00:00
Alexander.Likhachev 19073b96a7 [Build] Add a property to disable usernames obfuscation for build scans
The property is `kotlin.build.scan.obfuscate.username`
2023-06-07 12:33:10 +00:00
Alexander.Likhachev ebef67ea6a [Build] Enable internal Gradle setup plugin by default
Related to KTI-1223
2023-06-07 12:33:10 +00:00
Alexander.Likhachev 04fcffa664 [Build, IGS] Add a consent details document link
Related to KTI-1223
2023-06-07 12:33:10 +00:00
Svyatoslav Scherbina 063e7258ee Native: don't dispatch release for null Obj-C refs to the main thread
Currently, if a Kotlin object happens to have null for an associated
object but FLAGS_RELEASE_ON_MAIN_QUEUE flag set, GC will dispatch
Kotlin_ObjCExport_releaseAssociatedObject(null) to the main thread
anyway.

This couldn't happen before, but can now, with disposeObjCObject.
The commit prevents this, by moving the null check out from
Kotlin_ObjCExport_releaseAssociatedObject to call sites.

^KT-59134
2023-06-07 11:57:54 +00:00
Svyatoslav Scherbina 1bf3d55bdf Native: add detachObjCObject internal function for Obj-C objects
For a Kotlin wrapper of an Objective-C object, this functions zeroes
and releases the strong reference from the Kotlin wrapper to the
Objective-C object.
Usually, such a release happens only when the Kotlin wrapper is GCed.
So using this function can help that happen sooner.

^KT-59134
2023-06-07 11:57:54 +00:00
Dmitriy Novozhilov 6521729466 [Test] Update dumps of fir metadata where it differs on different platforms 2023-06-07 10:58:01 +00:00
Dmitriy Novozhilov 357c552b5f [Test] Set JVM target backend for load compiled tests which use JDK classes 2023-06-07 10:58:01 +00:00
Dmitriy Novozhilov 7eca772ec2 [JS Test] Introduce tests for loading metadata produced by JS compiler 2023-06-07 10:58:01 +00:00
Dmitriy Novozhilov 2290a096d1 [Test] Add JVM platform to name of ..FirLoadCompiledKotlin.. tests
This is needed for further distinguishing them with similar JS tests
2023-06-07 10:58:01 +00:00
Vyacheslav Gerasimov d5831587fb Build: Download jshell using configuration 2023-06-07 10:12:39 +00:00
Vyacheslav Gerasimov 965b00549f Build: Download webassembly wabt and test suite using configuration 2023-06-07 10:12:39 +00:00
Denis.Zharkov 0d070f8ba9 K2: Fix processing inference lower bound NullableType <: T & Any
Previously, it was led to plainly adding NullableType <: T constraint
which silently led to successful call completion.
What is suggested is just marking such initial constraint
as unsuccessful.

In K1, the error was reported just via additional type checking
mechanism being run after call completion.

^KT-58665 Fixed
2023-06-07 09:42:55 +00:00
Dmitrii Gridin 7bc04e2c33 [FIR] do not try to render resolveState for elements that are not supposed to have it
^KTIJ-25584 Fixed
2023-06-07 08:07:01 +00:00
Igor Chevdar 74a97ba730 [K/N][tests] Fixed a filecheck test 2023-06-07 05:22:49 +00:00
Nikolay Lunyak 45bbd432fc [FIR Native] Stop requiring :dist for native diagnostic test
Native uses its own klib stdlib generated
via `:kotlin-native:dist`.
2023-06-07 05:20:01 +00:00
Abduqodiri Qurbonzoda 0f4cca6877 [K/N] Throw OutOfMemoryError when String + String overflows 2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda 3917ec94ab [K/N] Use AbstractList.checkIndex() functions instead of custom check functions 2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda 89d1cfe05b [K/N] ArrayList.ensureCapacity() should ignore negative arguments 2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda ae394caf42 [K/N] Throw OutOfMemoryError when StringBuilder overflows 2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda af7965d996 [K/N] Use AbstractList.newCapacity in HashMap.ensureCapacity 2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda 2ef50f8c34 Move ArrayDeque.newCapacity to AbstractList 2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda d8cfc79d92 [K/N] Fix StringBuilder.setRange capacity expansion 2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda 21636efe38 [K/N] Small refactoring of StringBuilder 2023-06-06 18:11:56 +00:00
Ilmir Usmanov 95662234d0 JVM: Support instantiation of annotations with vararg parameters
when they are instantiated without argument.
 #KT-59033 Fixed
2023-06-06 17:27:52 +00:00
Yahor Berdnikau 67090ff10a [Gradle] Sync ListProperty, SetProperty and MapProperty types as non-convention
Such approach, while does not conform conceptually, ensures
compatibility with existing user build scripts and works more logically
for external users: https://github.com/gradle/gradle/issues/18352

^KT-59056 Fixed
2023-06-06 17:02:06 +00:00