diff --git a/.idea/libraries/kotlinc_allopen_compiler_plugin.xml b/.idea/libraries/kotlinc_allopen_compiler_plugin.xml
index 62a5f3bf7c14..7224411ffbb4 100644
--- a/.idea/libraries/kotlinc_allopen_compiler_plugin.xml
+++ b/.idea/libraries/kotlinc_allopen_compiler_plugin.xml
@@ -1,18 +1,18 @@
-
+
-
- fac3acf18b7eca2a1110dd2a85af8eb9c7049ba32dfc5102d4e0e0446d44c61d
+
+ 887a2bbd8d8bb333520eedffdb10b9dfe98f8a6a0a009ef07ec85eb14faad14c
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_analysis_api_providers.xml b/.idea/libraries/kotlinc_analysis_api_providers.xml
index 7edd231456ea..845a1f58ba11 100644
--- a/.idea/libraries/kotlinc_analysis_api_providers.xml
+++ b/.idea/libraries/kotlinc_analysis_api_providers.xml
@@ -1,18 +1,18 @@
-
+
-
- 08773ddb1cec02c3b797f7beccf7c0a46e83cb899e70659480dc10b9cc7a0e29
+
+ 33ec43d8794e44a4f6ae06cb59731cc2d630ec2ab1e7e9154072ac52c7e488aa
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_analysis_project_structure.xml b/.idea/libraries/kotlinc_analysis_project_structure.xml
index 635c18f70581..98e68818aa28 100644
--- a/.idea/libraries/kotlinc_analysis_project_structure.xml
+++ b/.idea/libraries/kotlinc_analysis_project_structure.xml
@@ -1,18 +1,18 @@
-
+
-
- 8a4df5561d09e8e44f77c29e73ea388c189e8ffb3e5a6acfa75f3d157fc56504
+
+ 0396b372088d03dff60b2a76bb8d3cb07757936e15c230abdf21dca17f43332d
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_android_extensions_compiler_plugin.xml b/.idea/libraries/kotlinc_android_extensions_compiler_plugin.xml
index ad04be996e3c..42af183f525b 100644
--- a/.idea/libraries/kotlinc_android_extensions_compiler_plugin.xml
+++ b/.idea/libraries/kotlinc_android_extensions_compiler_plugin.xml
@@ -1,18 +1,18 @@
-
+
-
- 52a22b4c0819745d36ee873ffe8441235b797fb5b522fca958017b28bf523b31
+
+ 079b85c926328d338e030341bf448d097c6b9786a68378b3315e618e1736ff95
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_assignment_compiler_plugin.xml b/.idea/libraries/kotlinc_assignment_compiler_plugin.xml
index efea1b454b7d..303ece97779e 100644
--- a/.idea/libraries/kotlinc_assignment_compiler_plugin.xml
+++ b/.idea/libraries/kotlinc_assignment_compiler_plugin.xml
@@ -1,18 +1,18 @@
-
+
-
- c0a707d2046d126ffd9f2a91b2120f375f85bdb3134d461bd98d8fc6b6afc68c
+
+ 3eed42d90d9d5643137010025f47caf27bef8ec14d19458c0ab4333780307ad8
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_high_level_api.xml b/.idea/libraries/kotlinc_high_level_api.xml
index 1f930b652afe..c60a832e2d0c 100644
--- a/.idea/libraries/kotlinc_high_level_api.xml
+++ b/.idea/libraries/kotlinc_high_level_api.xml
@@ -1,18 +1,18 @@
-
+
-
- 9dd740faf7e829b30ce263ba62de90bce3522a608764ff5adafb4c13e821689e
+
+ b293a5dd5761f57038a56f347db9a09a5c9e0b60f9254012ef1c0952ab3bcc2b
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_high_level_api_fe10.xml b/.idea/libraries/kotlinc_high_level_api_fe10.xml
index 1f623ee97a03..d3e1fab91b8f 100644
--- a/.idea/libraries/kotlinc_high_level_api_fe10.xml
+++ b/.idea/libraries/kotlinc_high_level_api_fe10.xml
@@ -1,18 +1,18 @@
-
+
-
- 93db0366bb8b5dcc82e63409ac5bf34f55f774b1c8ca091eb8221001f447bffe
+
+ 5d440a9ca04c87e1d97ed384bbd2af6109ca7904cc7d5e39d3408add531884bf
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_high_level_api_fir.xml b/.idea/libraries/kotlinc_high_level_api_fir.xml
index d8f2905cc132..da1dfe73d81f 100644
--- a/.idea/libraries/kotlinc_high_level_api_fir.xml
+++ b/.idea/libraries/kotlinc_high_level_api_fir.xml
@@ -1,18 +1,18 @@
-
+
-
- 9841d1db65ea747057d1ee782c9195208328f6eff0d1f76c155c4cce121d5785
+
+ 2355cfd078ba6a43965f273bf08a3c459ed87edafd6be7a75f27d873a2a84b10
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_high_level_api_fir_tests.xml b/.idea/libraries/kotlinc_high_level_api_fir_tests.xml
index e1c978951899..114276b8ba09 100644
--- a/.idea/libraries/kotlinc_high_level_api_fir_tests.xml
+++ b/.idea/libraries/kotlinc_high_level_api_fir_tests.xml
@@ -1,18 +1,18 @@
-
+
-
- 076739d0e0ca023623005cbe57bf40e88335f434d9c619ecfeedf752b9608c81
+
+ 60549540db9d1d2ab06db2d37811366f1941714a12a5586d71d7e521e815ca54
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_high_level_api_impl_base.xml b/.idea/libraries/kotlinc_high_level_api_impl_base.xml
index 9eca96ea3372..84b2674b61bb 100644
--- a/.idea/libraries/kotlinc_high_level_api_impl_base.xml
+++ b/.idea/libraries/kotlinc_high_level_api_impl_base.xml
@@ -1,18 +1,18 @@
-
+
-
- 3aaf51d5edac59ac7c938dfc0294c2b6955ce50cc59df9cc0dff5220c0c03f39
+
+ 599eaeecb8a2ffbcf33822f98293ea38395fbac2661344fdfa05fc46d7df4005
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_high_level_api_impl_base_tests.xml b/.idea/libraries/kotlinc_high_level_api_impl_base_tests.xml
index fcdea0c65a42..4c59fd2db6e3 100644
--- a/.idea/libraries/kotlinc_high_level_api_impl_base_tests.xml
+++ b/.idea/libraries/kotlinc_high_level_api_impl_base_tests.xml
@@ -1,18 +1,18 @@
-
+
-
- fe400bc6f998f439f5d543addc522a1a483f2f6413227d4a545b036c68516d16
+
+ 6f3aa820a326fd2342b9bec9206d6ad60c6bfe1fbdab974d9797c8bd21a2c486
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_incremental_compilation_impl_tests.xml b/.idea/libraries/kotlinc_incremental_compilation_impl_tests.xml
index 5f678de14039..5b67dbe023fb 100644
--- a/.idea/libraries/kotlinc_incremental_compilation_impl_tests.xml
+++ b/.idea/libraries/kotlinc_incremental_compilation_impl_tests.xml
@@ -1,18 +1,18 @@
-
+
-
- 6b40fb76c4f9feb304eef01f3c32925eef92162dc1261915ee1295c1628c6d7d
+
+ a1c7b435662d3863f9cd69af64c247e4c9d65f8337458e11c48e6178f8cd3fb2
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlin_build_common_tests.xml b/.idea/libraries/kotlinc_kotlin_build_common_tests.xml
index bdf9ce650653..b4b789713a0a 100644
--- a/.idea/libraries/kotlinc_kotlin_build_common_tests.xml
+++ b/.idea/libraries/kotlinc_kotlin_build_common_tests.xml
@@ -1,18 +1,18 @@
-
+
-
- d48e1e35a457e3fa6666244524a2f102073f185ccee7f995b566c5c00f9a0d40
+
+ 8710de97b317e4c1155e31d5fb486aa5ed54ef14e6edf0f087e05560b277d415
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlin_compiler_cli.xml b/.idea/libraries/kotlinc_kotlin_compiler_cli.xml
index f3414ede4019..de00ea4d8a33 100644
--- a/.idea/libraries/kotlinc_kotlin_compiler_cli.xml
+++ b/.idea/libraries/kotlinc_kotlin_compiler_cli.xml
@@ -1,18 +1,18 @@
-
+
-
- 956fa33e6dab685fe9c9354c4efe9a80cdad129a2d5ffe0853eac649de7ad02a
+
+ 74320cde0c41d881a2b738759b964fc3997900404a31dff1a57368fde5f62b8b
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlin_compiler_common.xml b/.idea/libraries/kotlinc_kotlin_compiler_common.xml
index ae967b4547eb..ab2c3a122331 100644
--- a/.idea/libraries/kotlinc_kotlin_compiler_common.xml
+++ b/.idea/libraries/kotlinc_kotlin_compiler_common.xml
@@ -1,18 +1,18 @@
-
+
-
- 6f5497194de2812df038d5052c7cc1d368e0c22f07da488981a0ca2698727614
+
+ 5f78e57674d32afd1a6461c89e1221cc95e80355ac70c81121127d16f0869b0f
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlin_compiler_fe10.xml b/.idea/libraries/kotlinc_kotlin_compiler_fe10.xml
index 5d165f058f9c..02c7ca7f1a94 100644
--- a/.idea/libraries/kotlinc_kotlin_compiler_fe10.xml
+++ b/.idea/libraries/kotlinc_kotlin_compiler_fe10.xml
@@ -1,18 +1,18 @@
-
+
-
- 9415fe0417ba7fff0ccbd6b321618adf13776974262569947ccf518389d9966a
+
+ d02c1633e08b9ecc618f8f9025960f105b8c1811907d21eb4e94d5ff9a49ca10
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlin_compiler_fir.xml b/.idea/libraries/kotlinc_kotlin_compiler_fir.xml
index 93e44fd5f718..b340ae7ef68f 100644
--- a/.idea/libraries/kotlinc_kotlin_compiler_fir.xml
+++ b/.idea/libraries/kotlinc_kotlin_compiler_fir.xml
@@ -1,18 +1,18 @@
-
+
-
- 57f4b3a3fe1fa04cde77f127aaf970d3126243b9bb01a2b7cbf349b09da75fbe
+
+ 4f8b9f845b27b6c384c349dd0e723658345d2ada9f0eea954e018932f860e074
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlin_compiler_ir.xml b/.idea/libraries/kotlinc_kotlin_compiler_ir.xml
index a9a2195787eb..6c04988b70f2 100644
--- a/.idea/libraries/kotlinc_kotlin_compiler_ir.xml
+++ b/.idea/libraries/kotlinc_kotlin_compiler_ir.xml
@@ -1,18 +1,18 @@
-
+
-
- 325edd18d986b5fac1429500f328731f0f5e56012e88297358f7bfb96aa35c28
+
+ 1b57525b257c747c59c39e5ee8f91222f36b0ac79b8cee1cd8ef53cbbc1b45ec
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlin_compiler_tests.xml b/.idea/libraries/kotlinc_kotlin_compiler_tests.xml
index ece839edda3d..ae5aeedeaa2b 100644
--- a/.idea/libraries/kotlinc_kotlin_compiler_tests.xml
+++ b/.idea/libraries/kotlinc_kotlin_compiler_tests.xml
@@ -1,18 +1,18 @@
-
+
-
- 2f856c77c4fb2fd7c55cd9d7b88269932d9b171f6f93760a77f09f27846f6e6f
+
+ 333f9d441f7b1dee00b9e2cae620e80c3b45db7e2c06865952c7b59b988852fd
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlin_gradle_statistics.xml b/.idea/libraries/kotlinc_kotlin_gradle_statistics.xml
index a8aadf65504f..7447e6049734 100644
--- a/.idea/libraries/kotlinc_kotlin_gradle_statistics.xml
+++ b/.idea/libraries/kotlinc_kotlin_gradle_statistics.xml
@@ -1,18 +1,18 @@
-
+
-
+
b85733a0ae14c035d391cae10cb7824aab122152d71f25ff5a3575e4f127d9d6
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlin_jps_common.xml b/.idea/libraries/kotlinc_kotlin_jps_common.xml
index 8a278da080fa..8b9cb7011283 100644
--- a/.idea/libraries/kotlinc_kotlin_jps_common.xml
+++ b/.idea/libraries/kotlinc_kotlin_jps_common.xml
@@ -1,18 +1,18 @@
-
+
-
+
74f59a1b88913836e93e444d85698c4dcfdb4adf7bb243825e6c13109aa8da81
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlin_jps_plugin_classpath_bootstrap_for_tests.xml b/.idea/libraries/kotlinc_kotlin_jps_plugin_classpath_bootstrap_for_tests.xml
index 079c5e67d3e6..5b43eb2b9307 100644
--- a/.idea/libraries/kotlinc_kotlin_jps_plugin_classpath_bootstrap_for_tests.xml
+++ b/.idea/libraries/kotlinc_kotlin_jps_plugin_classpath_bootstrap_for_tests.xml
@@ -1,18 +1,18 @@
-
+
-
- 1ea95a1a2ac91adfc1609e21ef60a5af5f212d58145b985cd807600e316e368d
+
+ dce53b4fd6ad6e5cb7b6838731084fce3b8e692f35f3148bfa4c22fdf58c60ef
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlin_script_runtime.xml b/.idea/libraries/kotlinc_kotlin_script_runtime.xml
index 1e8796ab2348..449546e47b12 100644
--- a/.idea/libraries/kotlinc_kotlin_script_runtime.xml
+++ b/.idea/libraries/kotlinc_kotlin_script_runtime.xml
@@ -1,18 +1,18 @@
-
+
-
- 61daa855ae1f8d83cf47d326ecba1b593b00e485e8c39c0e8fc173a703e5f80e
+
+ 64f55fa2944052113f8221fbdee034fca20e55e515cdd74a390cfb8a409c6565
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlin_scripting_common.xml b/.idea/libraries/kotlinc_kotlin_scripting_common.xml
index 5ffb3a4f9cac..ce4929c1cdb1 100644
--- a/.idea/libraries/kotlinc_kotlin_scripting_common.xml
+++ b/.idea/libraries/kotlinc_kotlin_scripting_common.xml
@@ -1,18 +1,18 @@
-
+
-
- 4fb1c7e739d7b2a6f217a747d39abe15010553db16ce8a668a22a92098e3521c
+
+ b05642d1e32d86f24aadac16260d2228014708f14bec89e0e73eec14425e56ec
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlin_scripting_compiler_impl.xml b/.idea/libraries/kotlinc_kotlin_scripting_compiler_impl.xml
index 02c096bab78d..407f84b60880 100644
--- a/.idea/libraries/kotlinc_kotlin_scripting_compiler_impl.xml
+++ b/.idea/libraries/kotlinc_kotlin_scripting_compiler_impl.xml
@@ -1,18 +1,18 @@
-
+
-
- bafd0fab75bd554254a786447b81231e7c12970713db486bd58176bf4e3ba42d
+
+ a38a47686d741478d44ca3eebfdef49f864198339f966c1da3f8302335e93aae
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlin_scripting_jvm.xml b/.idea/libraries/kotlinc_kotlin_scripting_jvm.xml
index da3e514cf397..643ad7f7c089 100644
--- a/.idea/libraries/kotlinc_kotlin_scripting_jvm.xml
+++ b/.idea/libraries/kotlinc_kotlin_scripting_jvm.xml
@@ -1,18 +1,18 @@
-
+
-
- 93392913bd21269ec2fe604756e2357effa8b5394b0e5c91af636841ccd57801
+
+ fdfdcad939644c4fa3bb87e4fad94e7e5b7a5f44f04e6928d18ab3ab5f3383e1
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_kotlinx_serialization_compiler_plugin.xml b/.idea/libraries/kotlinc_kotlinx_serialization_compiler_plugin.xml
index b953864a035f..7f9d9c1e7d90 100644
--- a/.idea/libraries/kotlinc_kotlinx_serialization_compiler_plugin.xml
+++ b/.idea/libraries/kotlinc_kotlinx_serialization_compiler_plugin.xml
@@ -1,18 +1,18 @@
-
+
-
- 80a60330546a8183cbe2284105ebd73b44e257b6e2ef35f93952ccab8d55863b
+
+ 7d9f771d9c66269a19de62067c3ec87f59eec80b73193f0b3ff85fe1e47172c1
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_lombok_compiler_plugin.xml b/.idea/libraries/kotlinc_lombok_compiler_plugin.xml
index efd563bf5e90..26150cdf7f7a 100644
--- a/.idea/libraries/kotlinc_lombok_compiler_plugin.xml
+++ b/.idea/libraries/kotlinc_lombok_compiler_plugin.xml
@@ -1,18 +1,18 @@
-
+
-
- 5f980cc9816821c330c5ee5cf71a8d9705a4af447f20877e33448ff5c9435288
+
+ 1f2b31a9a0d5565280743abcd703d49a03b12055011a6187d4bb4cffb5a9ed38
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_low_level_api_fir.xml b/.idea/libraries/kotlinc_low_level_api_fir.xml
index a486ae4d5da0..f4623c1b20ba 100644
--- a/.idea/libraries/kotlinc_low_level_api_fir.xml
+++ b/.idea/libraries/kotlinc_low_level_api_fir.xml
@@ -1,18 +1,18 @@
-
+
-
- 1e73b3e6fbb2ee56fa179290f5e9e52d22e98424a962b4705a55b8b134019ef6
+
+ 98bf712e8e21c840787b48d5ec86159aaff3e645effa4ef9e19c5cea266a351a
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_noarg_compiler_plugin.xml b/.idea/libraries/kotlinc_noarg_compiler_plugin.xml
index 84ddb54059a9..19f39b3d292a 100644
--- a/.idea/libraries/kotlinc_noarg_compiler_plugin.xml
+++ b/.idea/libraries/kotlinc_noarg_compiler_plugin.xml
@@ -1,18 +1,18 @@
-
+
-
- 73dbffd86d5855b9cedf8b47c31868f602644fad0739abe8220ad2e0e59c5418
+
+ b1520efa20bf100273b0c516d80e860c9331dee276b01650626b2419f486313e
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_parcelize_compiler_plugin.xml b/.idea/libraries/kotlinc_parcelize_compiler_plugin.xml
index 5ab58785cb0f..5e6a34469b6e 100644
--- a/.idea/libraries/kotlinc_parcelize_compiler_plugin.xml
+++ b/.idea/libraries/kotlinc_parcelize_compiler_plugin.xml
@@ -1,18 +1,18 @@
-
+
-
- 83f3c691c5b8d0c5e8adaa72613d84e4ebf0089a39330c15181ff50999653a2a
+
+ c4150db6fd4f0e975fd93d595a028ae108dccf6e4bf4e8e25b029d55fb195173
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_sam_with_receiver_compiler_plugin.xml b/.idea/libraries/kotlinc_sam_with_receiver_compiler_plugin.xml
index b4214429e139..e2b2d3daffa8 100644
--- a/.idea/libraries/kotlinc_sam_with_receiver_compiler_plugin.xml
+++ b/.idea/libraries/kotlinc_sam_with_receiver_compiler_plugin.xml
@@ -1,18 +1,18 @@
-
+
-
- 1fd53f076800633e7f900cfba9381019aa18d8c72057b29ce5795318a6f458af
+
+ a36baa1fed10aa978adfe12b6924884856a6daa09894e98182368a644d34e4d1
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_scripting_compiler_plugin.xml b/.idea/libraries/kotlinc_scripting_compiler_plugin.xml
index d80babb4f931..2eb20b660f3c 100644
--- a/.idea/libraries/kotlinc_scripting_compiler_plugin.xml
+++ b/.idea/libraries/kotlinc_scripting_compiler_plugin.xml
@@ -1,18 +1,18 @@
-
+
-
- f14e9c7235e836647742c30193b7e04dd05f8bc8cbca17838406c0d761460f91
+
+ 564fd44067e96864cfb3a733f58447b393a87b743206dbddbbc1047ed4473c0f
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/kotlinc_symbol_light_classes.xml b/.idea/libraries/kotlinc_symbol_light_classes.xml
index c618dd54ebbd..91c8fa337011 100644
--- a/.idea/libraries/kotlinc_symbol_light_classes.xml
+++ b/.idea/libraries/kotlinc_symbol_light_classes.xml
@@ -1,18 +1,18 @@
-
+
-
- 3eaaf7a8312ef42a02a667a311594eb63914432e105ee5dba75ee41c3bbd12d8
+
+ 6874a013f22f905a8b73ea2576180391b999530d4ffc92b944bffd8f673ed4c4
-
+
-
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/Kotlin_Coop__Publish_compiler_for_ide_JARs.xml b/.idea/runConfigurations/Kotlin_Coop__Publish_compiler_for_ide_JARs.xml
index 8ebff410d95e..2e9acb13b85e 100644
--- a/.idea/runConfigurations/Kotlin_Coop__Publish_compiler_for_ide_JARs.xml
+++ b/.idea/runConfigurations/Kotlin_Coop__Publish_compiler_for_ide_JARs.xml
@@ -4,7 +4,7 @@
-
+
diff --git a/plugins/kotlin/analysis/src/org/jetbrains/kotlin/idea/references/ReadWriteAccessCheckerDescriptorsImpl.kt b/plugins/kotlin/analysis/src/org/jetbrains/kotlin/idea/references/ReadWriteAccessCheckerDescriptorsImpl.kt
deleted file mode 100644
index 29c0aeebd438..000000000000
--- a/plugins/kotlin/analysis/src/org/jetbrains/kotlin/idea/references/ReadWriteAccessCheckerDescriptorsImpl.kt
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
-
-package org.jetbrains.kotlin.idea.references
-
-import org.jetbrains.kotlin.idea.caches.resolve.resolveToCall
-import org.jetbrains.kotlin.psi.KtBinaryExpression
-import org.jetbrains.kotlin.psi.KtExpression
-import org.jetbrains.kotlin.resolve.calls.model.isReallySuccess
-import org.jetbrains.kotlin.resolve.references.ReferenceAccess
-import org.jetbrains.kotlin.types.expressions.OperatorConventions
-
-class ReadWriteAccessCheckerDescriptorsImpl : ReadWriteAccessChecker {
- override fun readWriteAccessWithFullExpressionByResolve(assignment: KtBinaryExpression): Pair? {
- val resolvedCall = assignment.resolveToCall() ?: return null
- if (!resolvedCall.isReallySuccess()) return null
- return if (resolvedCall.resultingDescriptor.name in OperatorConventions.ASSIGNMENT_OPERATIONS.values)
- ReferenceAccess.READ to assignment
- else
- null
- }
-}
diff --git a/plugins/kotlin/base/analysis-api-providers/resources/kotlin.base.analysis-api-providers.xml b/plugins/kotlin/base/analysis-api-providers/resources/kotlin.base.analysis-api-providers.xml
index 8159e3922291..406c01dba49b 100644
--- a/plugins/kotlin/base/analysis-api-providers/resources/kotlin.base.analysis-api-providers.xml
+++ b/plugins/kotlin/base/analysis-api-providers/resources/kotlin.base.analysis-api-providers.xml
@@ -18,9 +18,6 @@
-
diff --git a/plugins/kotlin/base/fir/analysis-api-providers/resources/kotlin.base.fir.analysis-api-providers.xml b/plugins/kotlin/base/fir/analysis-api-providers/resources/kotlin.base.fir.analysis-api-providers.xml
index c3e2cafb0989..5901dc67c027 100644
--- a/plugins/kotlin/base/fir/analysis-api-providers/resources/kotlin.base.fir.analysis-api-providers.xml
+++ b/plugins/kotlin/base/fir/analysis-api-providers/resources/kotlin.base.fir.analysis-api-providers.xml
@@ -12,12 +12,8 @@
serviceInterface="org.jetbrains.kotlin.analysis.providers.KotlinDirectInheritorsProvider"
serviceImplementation="org.jetbrains.kotlin.idea.base.fir.analysisApiProviders.FirIdeKotlinDirectInheritorsProvider"/>
-
-
-
diff --git a/plugins/kotlin/base/fir/analysis-api-providers/src/org/jetbrains/kotlin/idea/base/fir/analysisApiProviders/FirAnalysisEventSubscriptionProjectActivity.kt b/plugins/kotlin/base/fir/analysis-api-providers/src/org/jetbrains/kotlin/idea/base/fir/analysisApiProviders/FirAnalysisEventSubscriptionProjectActivity.kt
deleted file mode 100644
index 90dc84373436..000000000000
--- a/plugins/kotlin/base/fir/analysis-api-providers/src/org/jetbrains/kotlin/idea/base/fir/analysisApiProviders/FirAnalysisEventSubscriptionProjectActivity.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
-package org.jetbrains.kotlin.idea.base.fir.analysisApiProviders
-
-import com.intellij.openapi.project.Project
-import com.intellij.openapi.startup.ProjectActivity
-import org.jetbrains.kotlin.analysis.low.level.api.fir.sessions.LLFirSessionInvalidationService
-import org.jetbrains.kotlin.analysis.providers.analysisMessageBus
-
-/**
- * [FirAnalysisEventSubscriptionProjectActivity] sets up subscriptions to events published via [analysisMessageBus] for FIR services. This
- * approach is favored over defining `projectListeners` in the plugin XML configuration for two reasons:
- *
- * 1. [analysisMessageBus] is not guaranteed to be the same as the [Project]'s message bus, by design, and `projectListeners` registers
- * listeners with the project message bus.
- * 2. Services like [LLFirSessionInvalidationService] have to register listeners when running in the IDE, but also in Analysis API
- * standalone mode. We cannot register listeners via XML in standalone mode, so this approach allows putting the subscription
- * configuration in one place.
- */
-internal class FirAnalysisEventSubscriptionProjectActivity : ProjectActivity {
- override suspend fun execute(project: Project) {
- LLFirSessionInvalidationService.getInstance(project).subscribeToModificationEvents()
- }
-}
diff --git a/plugins/kotlin/base/fir/analysis-api-providers/test/org/jetbrains/kotlin/idea/fir/analysis/providers/sessions/AbstractSessionInvalidationTest.kt b/plugins/kotlin/base/fir/analysis-api-providers/test/org/jetbrains/kotlin/idea/fir/analysis/providers/sessions/AbstractSessionInvalidationTest.kt
index fce773b8db7f..8f575abe16d2 100644
--- a/plugins/kotlin/base/fir/analysis-api-providers/test/org/jetbrains/kotlin/idea/fir/analysis/providers/sessions/AbstractSessionInvalidationTest.kt
+++ b/plugins/kotlin/base/fir/analysis-api-providers/test/org/jetbrains/kotlin/idea/fir/analysis/providers/sessions/AbstractSessionInvalidationTest.kt
@@ -2,6 +2,7 @@
package org.jetbrains.kotlin.idea.fir.analysis.providers.sessions
import com.intellij.openapi.module.ModuleManager
+import org.jetbrains.kotlin.analysis.low.level.api.fir.LLFirInternals
import org.jetbrains.kotlin.analysis.low.level.api.fir.LLFirResolveSessionService
import org.jetbrains.kotlin.analysis.low.level.api.fir.sessions.LLFirSession
import org.jetbrains.kotlin.analysis.project.structure.KtModule
@@ -54,6 +55,7 @@ sealed class AbstractSessionInvalidationTest : AbstractProjectStructureTest {
val projectModules = ModuleManager.getInstance(mainModule.project).modules
.flatMap { it.sourceModuleInfos }
diff --git a/plugins/kotlin/base/fir/analysis-api-providers/test/org/jetbrains/kotlin/idea/fir/analysis/providers/sessions/DanglingFileModuleInvalidationTest.kt b/plugins/kotlin/base/fir/analysis-api-providers/test/org/jetbrains/kotlin/idea/fir/analysis/providers/sessions/DanglingFileModuleInvalidationTest.kt
index c25492d51900..7adcaa0a4e53 100644
--- a/plugins/kotlin/base/fir/analysis-api-providers/test/org/jetbrains/kotlin/idea/fir/analysis/providers/sessions/DanglingFileModuleInvalidationTest.kt
+++ b/plugins/kotlin/base/fir/analysis-api-providers/test/org/jetbrains/kotlin/idea/fir/analysis/providers/sessions/DanglingFileModuleInvalidationTest.kt
@@ -2,6 +2,7 @@
package org.jetbrains.kotlin.idea.fir.analysis.providers.sessions
import com.intellij.psi.PsiManager
+import org.jetbrains.kotlin.analysis.low.level.api.fir.LLFirInternals
import org.jetbrains.kotlin.analysis.low.level.api.fir.LLFirResolveSessionService
import org.jetbrains.kotlin.analysis.low.level.api.fir.sessions.LLFirSession
import org.jetbrains.kotlin.analysis.project.structure.ProjectStructureProvider
@@ -588,6 +589,7 @@ class DanglingFileModuleInvalidationTest : AbstractMultiModuleTest() {
return Pair(sessionBefore, sessionAfter)
}
+ @OptIn(LLFirInternals::class)
private fun getSession(element: KtElement): LLFirSession {
val module = ProjectStructureProvider.getModule(project, element, contextualModule = null)
val resolveSession = LLFirResolveSessionService.getInstance(project).getFirResolveSession(module)
diff --git a/plugins/kotlin/compiler-plugins/parcelize/k1/resources/META-INF/parcelize.k1.xml b/plugins/kotlin/compiler-plugins/parcelize/k1/resources/META-INF/parcelize.k1.xml
index e53400b650d1..05d6fa18f6f1 100644
--- a/plugins/kotlin/compiler-plugins/parcelize/k1/resources/META-INF/parcelize.k1.xml
+++ b/plugins/kotlin/compiler-plugins/parcelize/k1/resources/META-INF/parcelize.k1.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/plugins/kotlin/compiler-plugins/parcelize/k2/resources/META-INF/parcelize.k2.xml b/plugins/kotlin/compiler-plugins/parcelize/k2/resources/META-INF/parcelize.k2.xml
index d12d83384b0b..d879e9fd733d 100644
--- a/plugins/kotlin/compiler-plugins/parcelize/k2/resources/META-INF/parcelize.k2.xml
+++ b/plugins/kotlin/compiler-plugins/parcelize/k2/resources/META-INF/parcelize.k2.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/plugins/kotlin/fir/src/org/jetbrains/kotlin/idea/references/ReadWriteAccessCheckerDescriptorsFirImpl.kt b/plugins/kotlin/fir/src/org/jetbrains/kotlin/idea/references/ReadWriteAccessCheckerDescriptorsFirImpl.kt
deleted file mode 100644
index f3d6f745115e..000000000000
--- a/plugins/kotlin/fir/src/org/jetbrains/kotlin/idea/references/ReadWriteAccessCheckerDescriptorsFirImpl.kt
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
-
-package org.jetbrains.kotlin.idea.references
-
-import org.jetbrains.kotlin.name.Name
-import org.jetbrains.kotlin.psi.KtBinaryExpression
-import org.jetbrains.kotlin.psi.KtExpression
-import org.jetbrains.kotlin.psi.KtNamedFunction
-import org.jetbrains.kotlin.resolve.references.ReferenceAccess
-import org.jetbrains.kotlin.types.expressions.OperatorConventions
-
-class ReadWriteAccessCheckerDescriptorsFirImpl : ReadWriteAccessChecker {
- override fun readWriteAccessWithFullExpressionByResolve(assignment: KtBinaryExpression): Pair? {
- val function = assignment.operationReference.mainReference.resolve() as? KtNamedFunction ?: return null
- val name = function.name ?: return null
- return if (Name.identifier(name) in OperatorConventions.ASSIGNMENT_OPERATIONS.values)
- ReferenceAccess.READ to assignment
- else
- null
- }
-}
\ No newline at end of file
diff --git a/plugins/kotlin/fir/tests/test/org/jetbrains/kotlin/idea/fir/imports/FirJvmOptimizeImportsTestGenerated.java b/plugins/kotlin/fir/tests/test/org/jetbrains/kotlin/idea/fir/imports/FirJvmOptimizeImportsTestGenerated.java
index e5dff2f7eef0..5bdf54701307 100644
--- a/plugins/kotlin/fir/tests/test/org/jetbrains/kotlin/idea/fir/imports/FirJvmOptimizeImportsTestGenerated.java
+++ b/plugins/kotlin/fir/tests/test/org/jetbrains/kotlin/idea/fir/imports/FirJvmOptimizeImportsTestGenerated.java
@@ -191,6 +191,11 @@ public abstract class FirJvmOptimizeImportsTestGenerated extends AbstractFirJvmO
runTest("../../idea/tests/testData/editor/optimizeImports/jvm/KDocReference.kt");
}
+ @TestMetadata("KDocReference2.kt")
+ public void testKDocReference2() throws Exception {
+ runTest("../../idea/tests/testData/editor/optimizeImports/jvm/KDocReference2.kt");
+ }
+
@TestMetadata("KT10226.kt")
public void testKT10226() throws Exception {
runTest("../../idea/tests/testData/editor/optimizeImports/jvm/KT10226.kt");
diff --git a/plugins/kotlin/fir/tests/test/org/jetbrains/kotlin/idea/fir/testUtils.kt b/plugins/kotlin/fir/tests/test/org/jetbrains/kotlin/idea/fir/testUtils.kt
index 0fc6838f44ff..58d87d9a099e 100644
--- a/plugins/kotlin/fir/tests/test/org/jetbrains/kotlin/idea/fir/testUtils.kt
+++ b/plugins/kotlin/fir/tests/test/org/jetbrains/kotlin/idea/fir/testUtils.kt
@@ -1,10 +1,13 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
+@file:OptIn(LLFirInternals::class)
+
package org.jetbrains.kotlin.idea.fir
import com.intellij.openapi.application.runWriteAction
import com.intellij.openapi.components.service
import com.intellij.openapi.project.Project
+import org.jetbrains.kotlin.analysis.low.level.api.fir.LLFirInternals
import org.jetbrains.kotlin.analysis.low.level.api.fir.LLFirResolveSessionService
import org.jetbrains.kotlin.analysis.low.level.api.fir.api.LLFirResolveSession
import org.jetbrains.kotlin.analysis.low.level.api.fir.project.structure.LLFirBuiltinsSessionFactory
diff --git a/plugins/kotlin/frontend-independent/src/org/jetbrains/kotlin/idea/references/KtIdeReferenceProviderService.kt b/plugins/kotlin/frontend-independent/src/org/jetbrains/kotlin/idea/references/KtIdeReferenceProviderService.kt
deleted file mode 100644
index 72f11b3cda20..000000000000
--- a/plugins/kotlin/frontend-independent/src/org/jetbrains/kotlin/idea/references/KtIdeReferenceProviderService.kt
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
-
-package org.jetbrains.kotlin.idea.references
-
-import com.intellij.openapi.project.IndexNotReadyException
-import com.intellij.openapi.project.Project
-import com.intellij.psi.ContributedReferenceHost
-import com.intellij.psi.PsiElement
-import com.intellij.psi.PsiReference
-import com.intellij.psi.PsiReferenceService
-import com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry
-import com.intellij.psi.util.CachedValueProvider
-import com.intellij.psi.util.CachedValuesManager
-import com.intellij.psi.util.PsiModificationTracker
-import com.intellij.util.containers.ConcurrentFactoryMap
-import com.intellij.util.containers.MultiMap
-import org.jetbrains.kotlin.psi.KotlinReferenceProvidersService
-import org.jetbrains.kotlin.utils.SmartList
-
-class KtIdeReferenceProviderService(project: Project) : KotlinReferenceProvidersService() {
- private val originalProvidersBinding: MultiMap, KotlinPsiReferenceProvider>
- private val providersBindingCache: Map, List>
-
- init {
- val registrar = KotlinPsiReferenceRegistrar()
- KotlinReferenceProviderContributor.getInstance(project).registerReferenceProviders(registrar)
- originalProvidersBinding = registrar.providers
-
- providersBindingCache = ConcurrentFactoryMap.createMap, List> { klass ->
- val result = SmartList()
- for (bindingClass in originalProvidersBinding.keySet()) {
- if (bindingClass.isAssignableFrom(klass)) {
- result.addAll(originalProvidersBinding.get(bindingClass))
- }
- }
- result
- }
- }
-
- private fun doGetKotlinReferencesFromProviders(context: PsiElement): Array {
- val providers: List? = providersBindingCache[context.javaClass]
- if (providers.isNullOrEmpty()) return PsiReference.EMPTY_ARRAY
-
- val result = SmartList()
- for (provider in providers) {
- try {
- result.addAll(provider.getReferencesByElement(context))
- } catch (ignored: IndexNotReadyException) {
- // Ignore and continue to next provider
- }
- }
-
- if (result.isEmpty()) {
- return PsiReference.EMPTY_ARRAY
- }
-
- return result.toTypedArray()
- }
-
- override fun getReferences(psiElement: PsiElement): Array {
- if (psiElement is ContributedReferenceHost) {
- return ReferenceProvidersRegistry.getReferencesFromProviders(psiElement, PsiReferenceService.Hints.NO_HINTS)
- }
-
- return CachedValuesManager.getCachedValue(psiElement) {
- CachedValueProvider.Result.create(
- doGetKotlinReferencesFromProviders(psiElement),
- PsiModificationTracker.MODIFICATION_COUNT
- )
- }
- }
-}
diff --git a/plugins/kotlin/highlighting/highlighting-k1/resources/META-INF/highlighting-fe10.xml b/plugins/kotlin/highlighting/highlighting-k1/resources/META-INF/highlighting-fe10.xml
index f2ee5219ace9..16e24000b24f 100644
--- a/plugins/kotlin/highlighting/highlighting-k1/resources/META-INF/highlighting-fe10.xml
+++ b/plugins/kotlin/highlighting/highlighting-k1/resources/META-INF/highlighting-fe10.xml
@@ -7,9 +7,6 @@
-
diff --git a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/imports/JvmOptimizeImportsTestGenerated.java b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/imports/JvmOptimizeImportsTestGenerated.java
index 522cc1ff1f4a..780b65be7a98 100644
--- a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/imports/JvmOptimizeImportsTestGenerated.java
+++ b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/imports/JvmOptimizeImportsTestGenerated.java
@@ -191,6 +191,11 @@ public abstract class JvmOptimizeImportsTestGenerated extends AbstractJvmOptimiz
runTest("testData/editor/optimizeImports/jvm/KDocReference.kt");
}
+ @TestMetadata("KDocReference2.kt")
+ public void testKDocReference2() throws Exception {
+ runTest("testData/editor/optimizeImports/jvm/KDocReference2.kt");
+ }
+
@TestMetadata("KT10226.kt")
public void testKT10226() throws Exception {
runTest("testData/editor/optimizeImports/jvm/KT10226.kt");
diff --git a/plugins/kotlin/idea/tests/testData/editor/optimizeImports/jvm/KDocReference.kt b/plugins/kotlin/idea/tests/testData/editor/optimizeImports/jvm/KDocReference.kt
index 8629a20cfad1..3d6efdc21a8d 100644
--- a/plugins/kotlin/idea/tests/testData/editor/optimizeImports/jvm/KDocReference.kt
+++ b/plugins/kotlin/idea/tests/testData/editor/optimizeImports/jvm/KDocReference.kt
@@ -1,4 +1,5 @@
// IGNORE_K2
+// TODO: it is quite similar to KDocRefernece.kt for K2 except no default imported ArrayList, see KTIJ-26751
import kotlin.concurrent.fixedRateTimer
import kotlin.concurrent.read
import kotlin.concurrent.withLock
diff --git a/plugins/kotlin/idea/tests/testData/editor/optimizeImports/jvm/KDocReference.kt.after b/plugins/kotlin/idea/tests/testData/editor/optimizeImports/jvm/KDocReference.kt.after
index fb834a003558..04f82f10ed7e 100644
--- a/plugins/kotlin/idea/tests/testData/editor/optimizeImports/jvm/KDocReference.kt.after
+++ b/plugins/kotlin/idea/tests/testData/editor/optimizeImports/jvm/KDocReference.kt.after
@@ -1,4 +1,5 @@
// IGNORE_K2
+// TODO: it is quite similar to KDocRefernece.kt for K2 except no default imported ArrayList, see KTIJ-26751
import java.util.concurrent.locks.Lock
import kotlin.concurrent.fixedRateTimer
import kotlin.concurrent.withLock
diff --git a/plugins/kotlin/idea/tests/testData/editor/optimizeImports/jvm/KDocReference2.kt b/plugins/kotlin/idea/tests/testData/editor/optimizeImports/jvm/KDocReference2.kt
new file mode 100644
index 000000000000..15bf66c60823
--- /dev/null
+++ b/plugins/kotlin/idea/tests/testData/editor/optimizeImports/jvm/KDocReference2.kt
@@ -0,0 +1,14 @@
+import kotlin.concurrent.fixedRateTimer
+import kotlin.concurrent.read
+import kotlin.concurrent.withLock
+import kotlin.concurrent.write
+import java.util.concurrent.locks.Lock
+
+/**
+ * Reference to [fixedRateTimer]
+ * Reference to [kotlin.concurrent.read]
+ * Reference to [Lock.withLock]
+ * Reference to [java.util.concurrent.locks.ReentrantReadWriteLock.write]
+ */
+fun foo() {
+}
diff --git a/plugins/kotlin/idea/tests/testData/editor/optimizeImports/jvm/KDocReference2.kt.after b/plugins/kotlin/idea/tests/testData/editor/optimizeImports/jvm/KDocReference2.kt.after
new file mode 100644
index 000000000000..c1309b96dc69
--- /dev/null
+++ b/plugins/kotlin/idea/tests/testData/editor/optimizeImports/jvm/KDocReference2.kt.after
@@ -0,0 +1,13 @@
+import java.util.concurrent.locks.Lock
+import kotlin.concurrent.fixedRateTimer
+import kotlin.concurrent.withLock
+import kotlin.concurrent.write
+
+/**
+ * Reference to [fixedRateTimer]
+ * Reference to [kotlin.concurrent.read]
+ * Reference to [Lock.withLock]
+ * Reference to [java.util.concurrent.locks.ReentrantReadWriteLock.write]
+ */
+fun foo() {
+}
diff --git a/plugins/kotlin/idea/tests/testData/highlighterMetaInfo/diagnostics/javaCodeInKotlinFile1.kt.highlighting.fir b/plugins/kotlin/idea/tests/testData/highlighterMetaInfo/diagnostics/javaCodeInKotlinFile1.kt.highlighting.fir
index 82072237bebf..e90518617e66 100644
--- a/plugins/kotlin/idea/tests/testData/highlighterMetaInfo/diagnostics/javaCodeInKotlinFile1.kt.highlighting.fir
+++ b/plugins/kotlin/idea/tests/testData/highlighterMetaInfo/diagnostics/javaCodeInKotlinFile1.kt.highlighting.fir
@@ -4,8 +4,8 @@
// HIGHLIGHTER_ATTRIBUTES_KEY
public class Hierarchy extends KotlinOnlyClass {
- void companionMembers() {
+ void companionMembers() {
Custom companionlateinitVariable = KotlinOnlyClass.companionlateinitVariable;
Custom companionlateinitStaticVariable = KotlinOnlyClass.companionlateinitStaticVariable;
- }
+ }
diff --git a/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/basic/objectQualifier.kt b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/basic/objectQualifier.kt
index 8525520d6372..7cb42b9d9395 100644
--- a/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/basic/objectQualifier.kt
+++ b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/basic/objectQualifier.kt
@@ -6,6 +6,4 @@ object A {
fun bar() {
A.foo()
-}
-
-// IGNORE_K2
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/basic/objectQualifier.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/basic/objectQualifier.kt.after
index 4b69aa9b6f6e..ec21b78fbb1b 100644
--- a/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/basic/objectQualifier.kt.after
+++ b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/basic/objectQualifier.kt.after
@@ -8,6 +8,4 @@ fun bar() {
a().foo()
}
-private fun a() = A
-
-// IGNORE_K2
\ No newline at end of file
+private fun a() = A
\ No newline at end of file
diff --git a/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/basic/objectQualifier.kt.fir.after b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/basic/objectQualifier.kt.fir.after
new file mode 100644
index 000000000000..f73e20a24568
--- /dev/null
+++ b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/basic/objectQualifier.kt.fir.after
@@ -0,0 +1,11 @@
+object A {
+ fun foo() {
+
+ }
+}
+
+fun bar() {
+ a().foo()
+}
+
+private fun a(): A = A
diff --git a/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakAndReturn.kt b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakAndReturn.kt
index d7ab3ff0438f..26b16a269d21 100644
--- a/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakAndReturn.kt
+++ b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakAndReturn.kt
@@ -11,6 +11,4 @@ fun foo(a: Int) {
println(a - b)
return
}
-}
-
-// IGNORE_K2
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakAndReturn.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakAndReturn.kt.after
index e177b2f2f96f..e98460d75ba4 100644
--- a/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakAndReturn.kt.after
+++ b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakAndReturn.kt.after
@@ -16,6 +16,4 @@ private fun __dummyTestFun__(a: Int, b: Int) {
if (a + b > 0) return
println(a - b)
return
-}
-
-// IGNORE_K2
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakContinueAndDefault.kt b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakContinueAndDefault.kt
index 32ba7525e0be..28fe8859fbaf 100644
--- a/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakContinueAndDefault.kt
+++ b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakContinueAndDefault.kt
@@ -12,6 +12,4 @@ fun foo(a: Int) {
if (a - b > 0) continue@loop1
}
}
-}
-
-// IGNORE_K2
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakContinueAndDefault.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakContinueAndDefault.kt.after
index e40b86cbdccb..7257cfd48f9f 100644
--- a/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakContinueAndDefault.kt.after
+++ b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakContinueAndDefault.kt.after
@@ -17,6 +17,4 @@ private fun b(a: Int, b: Int): Boolean {
if (a + b > 0) return true
if (a - b > 0) return true
return false
-}
-
-// IGNORE_K2
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakContinueAndDefault.kt.fir.after b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakContinueAndDefault.kt.fir.after
new file mode 100644
index 000000000000..2c935236503e
--- /dev/null
+++ b/plugins/kotlin/idea/tests/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakContinueAndDefault.kt.fir.after
@@ -0,0 +1,20 @@
+// PARAM_TYPES: kotlin.Int
+// PARAM_TYPES: kotlin.Int
+// PARAM_DESCRIPTOR: value-parameter a: kotlin.Int defined in foo
+// PARAM_DESCRIPTOR: val b: kotlin.Int defined in foo
+// SIBLING:
+fun foo(a: Int) {
+ val b: Int = 1
+ loop1@ for (p in 1..b) {
+ loop2@ for (n in 1..b) {
+ if (bool(a, b)) break@loop2
+ }
+ }
+}
+
+private fun bool(a: Int, b: Int): Boolean {
+ if (a > 0) throw Exception("")
+ if (a + b > 0) return true
+ if (a - b > 0) return true
+ return false
+}
\ No newline at end of file
diff --git a/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepInto/unsupported/stepIntoCoroutineScope.out b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepInto/unsupported/stepIntoCoroutineScope.out
index 12f7daf94b0d..8b05733ce78c 100644
--- a/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepInto/unsupported/stepIntoCoroutineScope.out
+++ b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepInto/unsupported/stepIntoCoroutineScope.out
@@ -2,8 +2,8 @@ LineBreakpoint created at stepIntoCoroutineScope.kt:8
Run Java
Connected to the target VM
stepIntoCoroutineScope.kt:8
-stepIntoCoroutineScope.kt:17
-stepIntoCoroutineScope.kt:21
+stepIntoCoroutineScope.kt:8
+stepIntoCoroutineScope.kt:9
stepIntoCoroutineScope.kt:8
resuming stepIntoCoroutineScope.kt:8
resuming stepIntoCoroutineScope.kt:8
@@ -13,4 +13,4 @@ resuming stepIntoCoroutineScope.kt:8
resuming stepIntoCoroutineScope.kt:8
Disconnected from the target VM
-Process finished with exit code 0
\ No newline at end of file
+Process finished with exit code 0
diff --git a/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverCoroutineScope.out b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverCoroutineScope.out
index 9ecf7df1eade..96fdc605edb2 100644
--- a/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverCoroutineScope.out
+++ b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverCoroutineScope.out
@@ -3,9 +3,10 @@ Run Java
Connected to the target VM
stepOverCoroutineScope.kt:26
stepOverCoroutineScope.kt:26
+stepOverCoroutineScope.kt:27
stepOverCoroutineScope.kt:28
stepOverCoroutineScope.kt:23
stepOverCoroutineScope.kt:33
Disconnected from the target VM
-Process finished with exit code 0
\ No newline at end of file
+Process finished with exit code 0
diff --git a/plugins/kotlin/k2-fe10-bindings/resources/META-INF/plugin.xml b/plugins/kotlin/k2-fe10-bindings/resources/META-INF/plugin.xml
index 7dbee84da8b7..68a83b1989b3 100644
--- a/plugins/kotlin/k2-fe10-bindings/resources/META-INF/plugin.xml
+++ b/plugins/kotlin/k2-fe10-bindings/resources/META-INF/plugin.xml
@@ -1,5 +1,5 @@
org.jetbrains.kotlin.fe10-binding
JetBrains
-
+
\ No newline at end of file
diff --git a/plugins/kotlin/plugin/common/resources/META-INF/light-classes.xml b/plugins/kotlin/plugin/common/resources/META-INF/light-classes.xml
index e37b21339614..748c77b2c6ed 100644
--- a/plugins/kotlin/plugin/common/resources/META-INF/light-classes.xml
+++ b/plugins/kotlin/plugin/common/resources/META-INF/light-classes.xml
@@ -1,13 +1,8 @@
-
-
-
-
\ No newline at end of file
diff --git a/plugins/kotlin/plugin/k1/resources/META-INF/k1.xml b/plugins/kotlin/plugin/k1/resources/META-INF/k1.xml
index dcab86d8907b..e5e22e4f42e0 100644
--- a/plugins/kotlin/plugin/k1/resources/META-INF/k1.xml
+++ b/plugins/kotlin/plugin/k1/resources/META-INF/k1.xml
@@ -1,46 +1,46 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
diff --git a/plugins/kotlin/plugin/k1/resources/META-INF/kotlin-core-fe10.xml b/plugins/kotlin/plugin/k1/resources/META-INF/kotlin-core-fe10.xml
index bfc175c688ef..f2585104826d 100644
--- a/plugins/kotlin/plugin/k1/resources/META-INF/kotlin-core-fe10.xml
+++ b/plugins/kotlin/plugin/k1/resources/META-INF/kotlin-core-fe10.xml
@@ -45,9 +45,6 @@
-
@@ -279,14 +276,6 @@
-
-
-
-
-
-
-
-
diff --git a/plugins/kotlin/plugin/k1/resources/META-INF/resolution-fe10.xml b/plugins/kotlin/plugin/k1/resources/META-INF/resolution-fe10.xml
index 229f16e3a63e..8a4c0b875ce0 100644
--- a/plugins/kotlin/plugin/k1/resources/META-INF/resolution-fe10.xml
+++ b/plugins/kotlin/plugin/k1/resources/META-INF/resolution-fe10.xml
@@ -1,13 +1,5 @@
-
-
-
+
diff --git a/plugins/kotlin/plugin/k2/resources/META-INF/k2.xml b/plugins/kotlin/plugin/k2/resources/META-INF/k2.xml
index ed701856aa4e..57dbab18d1e8 100644
--- a/plugins/kotlin/plugin/k2/resources/META-INF/k2.xml
+++ b/plugins/kotlin/plugin/k2/resources/META-INF/k2.xml
@@ -9,37 +9,33 @@
com.intellij.modules.java
com.intellij.modules.java-capable
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
@@ -73,15 +69,10 @@
serviceImplementation="org.jetbrains.kotlin.idea.fir.plugin.K2KotlinPluginModeProvider"/>
-
-
-
@@ -166,10 +157,6 @@
-
-
@@ -193,9 +180,6 @@
implementationClass="org.jetbrains.kotlin.idea.search.ideaExtensions.FirKotlinTargetElementEvaluator"/>
-
-
diff --git a/plugins/kotlin/plugin/k2/resources/META-INF/light-classes-fir.xml b/plugins/kotlin/plugin/k2/resources/META-INF/light-classes-fir.xml
deleted file mode 100644
index 04541f70fa4a..000000000000
--- a/plugins/kotlin/plugin/k2/resources/META-INF/light-classes-fir.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
diff --git a/plugins/kotlin/plugin/k2/resources/META-INF/lowLevelApiFir.xml b/plugins/kotlin/plugin/k2/resources/META-INF/lowLevelApiFir.xml
deleted file mode 100644
index 4aba53b0b27f..000000000000
--- a/plugins/kotlin/plugin/k2/resources/META-INF/lowLevelApiFir.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/plugins/kotlin/plugin/k2/testResources/META-INF/plugin.xml b/plugins/kotlin/plugin/k2/testResources/META-INF/plugin.xml
index 2e534f5f27c3..1c66faa282bd 100644
--- a/plugins/kotlin/plugin/k2/testResources/META-INF/plugin.xml
+++ b/plugins/kotlin/plugin/k2/testResources/META-INF/plugin.xml
@@ -10,5 +10,5 @@
-
+
diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/introduce/extractionEngine/ExtractionDataAnalyzer.kt b/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/introduce/extractionEngine/ExtractionDataAnalyzer.kt
index 920f88f10ad3..beafbd1dd7a6 100644
--- a/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/introduce/extractionEngine/ExtractionDataAnalyzer.kt
+++ b/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/introduce/extractionEngine/ExtractionDataAnalyzer.kt
@@ -55,6 +55,8 @@ import org.jetbrains.kotlin.lexer.KtModifierKeywordToken
import org.jetbrains.kotlin.lexer.KtTokens
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.psi.KtBlockExpression
+import org.jetbrains.kotlin.psi.KtBreakExpression
+import org.jetbrains.kotlin.psi.KtContinueExpression
import org.jetbrains.kotlin.psi.KtDeclaration
import org.jetbrains.kotlin.psi.KtExpression
import org.jetbrains.kotlin.psi.KtNamedDeclaration
@@ -62,6 +64,7 @@ import org.jetbrains.kotlin.psi.KtNamedFunction
import org.jetbrains.kotlin.psi.KtParameter
import org.jetbrains.kotlin.psi.KtProperty
import org.jetbrains.kotlin.psi.KtReferenceExpression
+import org.jetbrains.kotlin.psi.KtReturnExpression
import org.jetbrains.kotlin.psi.KtSimpleNameExpression
import org.jetbrains.kotlin.psi.KtThisExpression
import org.jetbrains.kotlin.psi.KtTreeVisitorVoid
@@ -179,10 +182,10 @@ internal class ExtractionDataAnalyzer(private val extractionData: ExtractionData
return OutputDescriptor(
defaultResultExpression = defaultExpressionInfo?.expression,
typeOfDefaultFlow = approximate(typeOfDefaultFlow) ?: builtinTypes.UNIT,
- valuedReturnExpressions = exitSnapshot.valuedReturnExpressions,
+ valuedReturnExpressions = exitSnapshot.valuedReturnExpressions.filter { it is KtReturnExpression },
returnValueType = approximate(exitSnapshot.returnValueType) ?: builtinTypes.UNIT,
- jumpExpressions = exitSnapshot.loopJumpExpressions,
- hasSingleTarget = !exitSnapshot.hasMultipleJumpTargets && !exitSnapshot.hasMultipleJumpKinds,
+ jumpExpressions = exitSnapshot.jumpExpressions.filter { it is KtBreakExpression || it is KtContinueExpression },
+ hasSingleTarget = !exitSnapshot.hasMultipleJumpTargets,
sameExitForDefaultAndJump = if (exitSnapshot.hasJumps) !exitSnapshot.hasEscapingJumps && defaultExpressionInfo != null else defaultExpressionInfo == null
)
}
diff --git a/plugins/kotlin/uast/uast-kotlin-fir/tests/test/org/jetbrains/fir/uast/test/uastTestUtils.kt b/plugins/kotlin/uast/uast-kotlin-fir/tests/test/org/jetbrains/fir/uast/test/uastTestUtils.kt
index b118dc8e8738..2d3b4af962cb 100644
--- a/plugins/kotlin/uast/uast-kotlin-fir/tests/test/org/jetbrains/fir/uast/test/uastTestUtils.kt
+++ b/plugins/kotlin/uast/uast-kotlin-fir/tests/test/org/jetbrains/fir/uast/test/uastTestUtils.kt
@@ -1,4 +1,4 @@
-// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.fir.uast.test
@@ -6,10 +6,11 @@ import com.intellij.openapi.application.runWriteAction
import com.intellij.openapi.components.service
import com.intellij.openapi.project.Project
import org.jetbrains.kotlin.analysis.api.KtAnalysisApiInternals
+import org.jetbrains.kotlin.analysis.low.level.api.fir.LLFirInternals
import org.jetbrains.kotlin.analysis.low.level.api.fir.project.structure.LLFirBuiltinsSessionFactory
import org.jetbrains.kotlin.analysis.providers.KotlinGlobalModificationService
-@OptIn(KtAnalysisApiInternals::class)
+@OptIn(KtAnalysisApiInternals::class, LLFirInternals::class)
internal fun Project.invalidateAllCachesForUastTests() {
runWriteAction {
KotlinGlobalModificationService.getInstance(this).publishGlobalModuleStateModification()
diff --git a/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyResolved/Lambdas.resolved.fir.txt b/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyResolved/Lambdas.resolved.fir.txt
index 4ade92235336..a13868585f46 100644
--- a/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyResolved/Lambdas.resolved.fir.txt
+++ b/plugins/kotlin/uast/uast-kotlin-fir/tests/testData/legacyResolved/Lambdas.resolved.fir.txt
@@ -9,7 +9,7 @@ UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = St
UQualifiedReferenceExpression -> UQualifiedReferenceExpression -> Decompiled_Method: empty
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = Stream) -> Decompiled_Class: Stream
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = empty) -> Decompiled_Method: empty
- UTypeReferenceExpression (name = java.lang.String) -> USimpleNameReferenceExpression (identifier = String) -> null: null
+ UTypeReferenceExpression (name = java.lang.String) -> USimpleNameReferenceExpression (identifier = String) -> Decompiled_Class: String
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = filter) -> Decompiled_Method: filter
UReturnExpression -> UQualifiedReferenceExpression -> Decompiled_Method: isEmpty
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = it) -> Kotlin_Light_Value_Parameter: it
diff --git a/plugins/kotlin/util/project-model-updater/resources/model.properties b/plugins/kotlin/util/project-model-updater/resources/model.properties
index 478add479410..b8cae277be3b 100644
--- a/plugins/kotlin/util/project-model-updater/resources/model.properties
+++ b/plugins/kotlin/util/project-model-updater/resources/model.properties
@@ -1,5 +1,5 @@
# Please do not touch this file. It is the responsibility of Kotlin/IntelliJ Kotlin team to advance kotlin compiler version
-kotlincVersion=2.0.20-dev-1117
+kotlincVersion=2.0.20-dev-1563
kotlincArtifactsMode=MAVEN
jpsPluginVersion=1.9.23-release-779