Commit Graph

79987 Commits

Author SHA1 Message Date
Abduqodiri Qurbonzoda fc5e4c20c1 Implement String case conversion generators #KT-45213 2021-03-02 01:11:38 +03:00
Abduqodiri Qurbonzoda 1066de1be6 Implement Char one-to-one and one-to-many case conversion generators #KT-45213 2021-03-02 01:11:36 +03:00
Dmitriy Dolovov 7ad35b2f49 [Commonizer] Change CIR type calculation procedure
- By default, all CIR types are created as abbreviated types
  (if such information is available in descriptors).
- When necessary, CIR type can be "unabbreviated" to remove any
  abbreviations from it. This can be done via a separate function
  in CirTypeFactory: unabbreviate().
2021-03-01 23:17:16 +03:00
Alexander Udalov 3f16f84d0d Fix warnings in buildSrc 2021-03-01 19:47:24 +01:00
Alexander Udalov 17a8d24a84 Fix warnings in Util.kt
There were unreachable code warnings in printMillisec, and indeed the
variable assignment was never executed, so the function would always
print "0 msec".
2021-03-01 19:47:24 +01:00
Alexander Udalov 5d6aa01086 Fix warnings in Java code in tests-common 2021-03-01 19:47:24 +01:00
Tianyu Geng bca393bd5c FIR IDE: Add quickfix for PRIVATE_SETTER_FOR_(OPEN|ABSTRACT)_PROPERTY 2021-03-01 19:30:31 +01:00
Mikhael Bogdanov 77559e8299 Temporary mute reflection test on Android 2021-03-01 18:05:27 +01:00
sebastian.sellmair a7a085d640 [Commonizer] ModuleSerializer: Sanitize library names for Windows
The CInterop tool can produce klibs that contain colons in their library name.
Therefore the library name, as is, cannot be used as file name.
The sanitizer will replace any occurring ':' with '_'
2021-03-01 19:53:08 +03:00
Pavel Kirpichenkov c68a4bdc0f [MPP] Consider expect-actual inline/value classes interchangeable
^KT-44926 Fixed
2021-03-01 19:25:31 +03:00
Pavel Kirpichenkov c8c44da061 Add test for KT-44926 2021-03-01 19:25:29 +03:00
Mikhael Bogdanov 373d0ac660 Fix ultra light class generation for private suspend methods 2021-03-01 16:20:20 +01:00
Mikhael Bogdanov 989fea3399 Remove version requirements for -Xjvm-default=enable (1.2.40) and JvmFieldInInterface(1.2.70) 2021-03-01 16:20:20 +01:00
Mikhael Bogdanov 49aa36b70d Generate local delegated properties in interface in jvm-default all modes 2021-03-01 16:20:20 +01:00
Mikhael Bogdanov c25a694b6b Generate private suspend functions as private (not synthetic package-private)
#KT-26592 Fixed
2021-03-01 16:20:19 +01:00
Mikhael Bogdanov ad8eddac99 Add test for private suspend and JVM defaults 2021-03-01 16:20:19 +01:00
Mikhael Bogdanov 8764bb09f2 Generate synthetic annotation method in interface if -Xjvm-default is on 2021-03-01 16:20:19 +01:00
Mikhail Glukhikh a101d12c78 Simplify PositioningStrategy in FIR diagnostic DSL 2021-03-01 16:57:56 +03:00
Mikhail Glukhikh 6fee46316e FIR: fix MANY_COMPANION_OBJECTS positioning 2021-03-01 16:57:55 +03:00
Tianyu Geng 724ca1d3ee FIR: introduce diagnostic NESTED_CLASS_NOT_ALLOWED 2021-03-01 16:57:54 +03:00
Jinseong Jeon c5cabce2d5 FIR: check visibility properly for CANNOT_CHANGE_ACCESS_PRIVILEGE 2021-03-01 16:57:51 +03:00
Andrei Klunnyi f45af5ea0e KT-44821 [Sealed Interfaces]: when-exhaustiveness failure in IDE
Compiler check for 'when' exhaustiveness requires that module
descriptors of a sealed class and its inheritors are the same (reference
identity matters). Prior to this commit and under some conditions they
were not. Details follow below.

Resolution related data structures (resolution facades) are organized
into trees (sdks, libs, and modules have their own nodes/facades,
module/class descriptors are stored inside). And the trees themselves
are put into a map associating so called PlatformAnalysisSettings and
GlobalFacades (plays a role of a root). PlatformAnalysisSettings is an
abstraction describing target platform and sdk of a module. The more
combinations exist for a project the more facades are used. Please, see
KotlinCacheService for more details.

So why a module can have multiple ModuleDescriptor-s?
Every tree mentioned above is an isolated resolution environment
containing its own instances of the outer world descriptors. Say, if a
project has modules X, Y, Z and we consider X then all three might have
their own vision of X, i.e. 3 descriptors exist at a time.

What descriptor instance does compiler get?
The path starts when the user opens a file in the editor and
highlighting pass starts (see usages of
ResolutionUtils#analyzeWithAllCompilerChecks). Module descriptor stored
in the resolution tree of the file's module gets injected into the
compiler's context. Starting from this moment compiler sees other
modules through the prism of a single resolution facade (tree).
Descriptors residing outside are alien.

This commit allows IdeSealedClassInheritorsProvider to figure out what
PlatformAnalysisSettings are associated with the resolution facade (read
ModuleDescriptor) seen by the compiler. Later on the same facade is used
to provide correct instances of sealed inheritors back to the compiler.
2021-03-01 12:12:00 +01:00
Roman Golyshev 6ebd4b954c Add new reference resolve tests
The main purpose is to show that old frontend and FIR work differently
in the case of the conflicts of local and top level classes/objects

See the tests that marked with // IGNORE_FIR

Corresponding ticket is ^KT-45192
2021-03-01 10:23:57 +00:00
anastasiia.spaseeva fb83c491bb Update compose version to 0.3.1 2021-03-01 11:19:23 +01:00
anastasiia.spaseeva cd23498cc4 Fix tests after libraries and wrappers versions updating 2021-03-01 11:19:23 +01:00
Ilya Goncharov 0a444bbc43 [Wizard, JS] Fix kotlin-redux version 2021-03-01 13:08:17 +03:00
Victor Turansky bc42ab8a2c Use optimized Ktor client (-0.5MB)
[Details](https://youtrack.jetbrains.com/issue/KTOR-1084)
2021-03-01 11:33:26 +03:00
Victor Turansky 180f924989 Use appropriate kotlin wrappers version (1.4.21 -> 1.4.30) 2021-03-01 11:33:04 +03:00
Nikolay Krasko 3022fb396b Add fasutil to the list of package to relocate (KT-44758)
#KT-44758 Fixed
2021-02-26 20:21:26 +03:00
anastasiia.spaseeva 1bb31bb36f Update libraries and wrappers versions for 1.5.0 2021-02-26 17:28:37 +01:00
Vasily Levchenko d2c9116b51 [fir][test] ignore native tree 2021-02-26 15:32:43 +01:00
Stanislav Erokhin f77ba914c7 [MERGE] Kotlin/Native history merged into kotlin/master 2021-02-26 15:30:58 +01:00
Alexander Likhachev 9d140cacc0 [Gradle, K/N] Create compiler download temp dir inside target dir
Motivation is to make directory moving more likely atomic
Relates to KT-39016
2021-02-26 16:11:19 +03:00
Alexander Likhachev 172b5f9621 [Gradle, K/N] Unpack compiler into temp directory then move to proper place
#KT-39016 Fixed
2021-02-26 16:11:14 +03:00
Yahor Berdnikau 45d423e78c Fix test is failing to run on CI.
Remove mistakenly added 'wait for debugger' flag.
2021-02-26 15:55:57 +03:00
Vasily Levchenko b05e742238 [commonizer-api] workaround for old k/n artifacts 2021-02-26 12:51:54 +01:00
Vasily Levchenko e123127a4a (!fixup)[build] cache repository fix 2021-02-26 12:51:53 +01:00
Alexander Udalov 417eb60ed3 Revert "Change order of WITH_RUNTIME and FILE. Wrong order brakes module pattern."
This reverts commit 073a500370.

(cherry picked from commit eec98314c8)
2021-02-26 12:51:53 +01:00
Vasily Levchenko f87132fff4 [performance] don't override user defined properties with fixed values 2021-02-26 12:51:53 +01:00
Vasily Levchenko be08e29cb3 [.idea][artifacts] added kotlinx_cli_jvm 2021-02-26 12:51:53 +01:00
Vasily Levchenko c9e0928038 [performance] enable project performance
(cherry picked from commit 947c3bd92b2ee8d252619cf987427a7e195191cb)
2021-02-26 12:51:53 +01:00
Vasily Levchenko f2524dbb8d [gradle][properties] default kotlin.native.home 2021-02-26 12:51:52 +01:00
Vasily Levchenko ed749f9b4a [.gitignore] add kotlin-native output folders 2021-02-26 12:51:52 +01:00
Vasily Levchenko 8eff15c8c2 [.idea][misc.xml] update after kotlin-native folder appear
- it isn't affected with kotlin.native.enable
2021-02-26 12:51:52 +01:00
Vasily Levchenko fe896619d9 [editorconfig] added for k/n 2021-02-26 12:51:52 +01:00
Aleksei.Cherepanov 710a6fb7f3 [JPS] Fix import for Kotlin Native
(cherry picked from commit 049045e5fefba86221273f64b7fd0b3c5d1792d2)
2021-02-26 12:51:52 +01:00
Vasily Levchenko f051119c4b [tests][kotlin-gradle-plugin] workaround for old k/n artifacts 2021-02-26 12:51:52 +01:00
Vasily Levchenko 5c80dbfd4b [kotlin-gradle-plugin] workaround for old k/n artifacts 2021-02-26 12:51:52 +01:00
Pavel Punegov 7ad656ea7f Fix cyclic dependency in run task configuration. 2021-02-26 12:51:51 +01:00
Nikolay Krasko c4178daf48 Remove Bintray kotlin-dev usage from kotlin-native
(cherry picked from commit ec4ac192a822949af55264157cf6f03d0c4f0c20)
2021-02-26 12:51:51 +01:00