Commit Graph

68925 Commits

Author SHA1 Message Date
Steven Schäfer 44ffb1fb3e Psi2Ir: Fix SAM conversion with new inference 2020-09-08 11:14:14 +03:00
pyos 75891e860b FIR2IR: split getIrPropertyOrFieldSymbol, handle locals there 2020-09-08 08:40:13 +03:00
pyos f198a19ab0 FIR2IR: add local delegated property generation 2020-09-08 08:40:07 +03:00
Steven Schäfer 4792be2522 JVM IR: Optimize static property references (KT-36975) 2020-09-07 21:01:29 +02:00
Alexander Udalov 669fda6b77 Do not add duplicate $completion when compiling JVM against JVM_IR
This change fixes JvmOldAgainstIrBoxInlineTestGenerated.Suspend and
JvmIrAgainstOldBoxInlineTestGenerated.Suspend tests.
2020-09-07 19:41:38 +02:00
Alexander Udalov ae448ececb Minor, add compileKotlinAgainstKotlin test case for KT-41374 2020-09-07 19:41:37 +02:00
Alexander Udalov 9e357354fb Add JVM/JVM_IR mixed compilation tests for compileKotlinAgainstKotlin/boxInline 2020-09-07 19:41:37 +02:00
Alexander Udalov e324733b01 Tests: accept TargetBackend in KotlinBaseTest.createConfiguration 2020-09-07 19:41:37 +02:00
Alexander Udalov 0dea6b94c6 JVM IR: unmute boxInline tests on enclosing method/class
In box tests, only check that Java reflection does not crash on the
EnclosingMethod attribute generated in these classes. If it doesn't
crash, most likely it returns the value that can be read from the class
file by ASM, which is what the newly added bytecode listing tests are
checking now.
2020-09-07 19:41:37 +02:00
Ilya Goncharov 985088a3f1 [Gradle, JS] Add test on dukat with both mode 2020-09-07 19:29:17 +03:00
Ilya Goncharov b694e3b009 [Gradle, JS] Dukat with both create externals only once 2020-09-07 19:29:17 +03:00
Ilya Goncharov 210cd982f0 [Gradle, JS] Use webpack config's required dependencies in karma
^KT-41663 fixed
^KT-41662 fixed
2020-09-07 18:56:47 +03:00
Pavel Kirpichenkov b5aca450b1 Make cancellation checks when building resolution anchor caches
^KT-39734
2020-09-07 18:52:10 +03:00
Pavel Kirpichenkov 54811613f4 Minor: drop unnecessary wrapper for utility function
^KT-39734
2020-09-07 18:52:10 +03:00
Pavel Kirpichenkov 1ff064d98d Make Kotlin OOCBM updater for modules internal again
Replace direct API access with dedicated service.
2020-09-07 18:52:10 +03:00
Pavel Kirpichenkov 9d6bdc6fc4 Support modification tracking for source-dependent LibraryInfo
#KT-39734
2020-09-07 18:52:10 +03:00
Pavel Kirpichenkov 6abd708d42 Preserve order entry to module info mapping in IdeaModelInfosCache 2020-09-07 18:52:10 +03:00
Pavel Kirpichenkov 24d8aee2bb Prioritize resolution anchors during resolution
When required dependency is present both in source dependencies and in
library dependencies, the former one should be selected.

#KT-24309
2020-09-07 18:52:10 +03:00
Pavel Kirpichenkov f8ee976720 Use union of all available descriptors in composite importing scope 2020-09-07 18:52:10 +03:00
Pavel Kirpichenkov 5892bdf3f4 Extend import resolution for library-to-source analysis
Use composite importing scope for references when resolution anchors are enabled.
Composite scope provides additional descriptors from scope of resolution anchor module.
Overriding old importing scope with a new one is not possible as it breaks library
dependencies on other libraries, which are inaccessible in anchor scope (scope for sources).

KT-24309 In Progress
2020-09-07 18:52:10 +03:00
Roman Golyshev 8c876e4621 FIR IDE: Get rid of originalPosition in KtFirCompletionCandidateChecker 2020-09-07 18:46:38 +03:00
Roman Golyshev 828fc2520c FIR IDE: Refactor KtFirCompletionCandidateChecker
- Move searching for the `originalEnclosingFunction`
to the `getImplicitReceivers`
2020-09-07 18:18:02 +03:00
Pavel Kirpichenkov 33ac487a42 [FIR-IDE] Fix leaking KtAnalysisSession 2020-09-07 17:40:18 +03:00
Roman Golyshev 909d418dd1 Improve diagnostics in KtElementImplStub::getContainingKtFile
- If containing file is not a `PsiFileImpl`, `getNode()` will
throw a CCE (which will prevent collecting the diagnostics)
- Relates to #EA-209630
2020-09-07 14:36:09 +00:00
Dmitry Petrov 5b53663eb8 PSI2IR KT-41181 don't generate deep trees in hashCode 2020-09-07 16:09:42 +03:00
Dmitry Petrov ade1a346e1 JVM: add test for KT-40123 2020-09-07 16:09:42 +03:00
Vladimir Ilmov 45c67a90c2 (CoroutineDebugger) Disposing under IW lock.
#KT-41505 fixed
2020-09-07 14:50:07 +02:00
Sebastian Kaspari 01143f24a4 Add KotlinClassConstructorInfoHandler for showing parameter info of parameterized super class constructor.
^KT-41617 Fixed
2020-09-07 13:23:08 +02:00
Pavel Kirpichenkov d674f519fd [FIR-IDE] Fix completion check for generic extensions
Generic candidate extensions are completed in partial mode
when there is not enough information for type parameter in return position.
Partial completion mode in single candidate resolver leads to unconditionally failing candidate.
Providing noExpectedType instead of null guarantees full completion.
2020-09-07 13:38:11 +03:00
Vladimir Ilmov 60dfa8cc84 Ignore ProcessCancelledException in VirtualFileKotlinClass 2020-09-07 12:17:06 +02:00
Vladimir Dolzhenko 3de32e13ea Clean up declarationAccessorNames debug check in UnusedSymbolInspection
declarationAccessorNames(KtNamedDeclaration) could be more than declaration.getAccessorNames() as it relies on LC, some of them could be not accessible

^EA-237873 Fixed
2020-09-07 09:36:28 +00:00
Vladimir Dolzhenko 127257aa27 Provide setter-method for LC for private property setter
^KT-41694 Fixed
2020-09-07 09:36:28 +00:00
Vladimir Dolzhenko b5b319803b Add more diagnostics to tackle exception in KotlinFunctionParameterInfoHandler
Relates to #EA-221900
2020-09-07 09:36:27 +00:00
Vladimir Dolzhenko 87e70cf690 Handle project disposed in ScriptDefinitionsManager
^EA-237136 Fixed
2020-09-07 09:36:26 +00:00
Vladimir Dolzhenko 4e3b1f141e Use runReadActionInSmartMode instead of runReadAction in ConfigureKotlinInProjectUtils
runReadActionInSmartMode has no effect if it is already run under runReadAction - therefore it could lead to IndexNotReadyException

^EA-220414 Fixed
^EA-210940 Fixed
^KT-30929 Fixed
2020-09-07 09:36:26 +00:00
Vladimir Dolzhenko 02be470e91 Check if vFile is still valid in ScriptClassRootsUpdater#updateHighlighting
^EA-218774 Fixed
2020-09-07 09:36:25 +00:00
Vladimir Dolzhenko ba027a785c Fix NPE in GradleScriptInfo
^EA-237746 Fixed
2020-09-07 09:36:24 +00:00
Vladimir Dolzhenko 698f51079f Perform paste reference resolve in smart mode
^EA-226712 Fixed
2020-09-07 09:36:24 +00:00
Dmitry Petrov b00ce872ea JVM: record JVM signature for equals/hashCode/toString in inline classes 2020-09-07 12:25:50 +03:00
Lilia 38975e4e7c Add changelog for 1.4.10 2020-09-06 19:10:42 +07:00
cketti 7755d9fe24 Mark used parameters as disabled in parameter info popup
When using named arguments the IDE might be unable to map the current
argument to a parameter. In that case mark already used parameters as
disabled. That way developers can easily see which parameters have not
been used yet.

^KTIJ-128 Fixed
2020-09-05 23:17:46 +02:00
Yaroslav Chernyshev 81339d54eb Added :core:compiler.common.jvm and :compiler:resolution.common.jvm
dependencies to pill importer
2020-09-05 10:56:55 +03:00
Toshiaki Kameyama 3f7aab6fae Redundant 'asSequence' call: don't report when reciever type is Map
#KT-41338 Fixed
2020-09-04 22:10:34 +02:00
cketti 78493395c3 Don't mark signature as inapplicable when argument is empty/incomplete
This will improve the usability when using named arguments where
incomplete arguments can't be mapped to a parameter simply by position.

^KT-24172 Fixed
2020-09-04 13:11:24 +02:00
Toshiaki Kameyama 343010a833 "Unused equals expression" inspection: highlight whole expression with yellow background
^KT-41615 Fixed
2020-09-04 12:55:55 +02:00
Dmitriy Novozhilov b81ec2c8f0 Fix compilation errors in bunches 2020-09-04 11:42:51 +03:00
Dmitriy Novozhilov a8c68d9e6f Remove dependency on :compiler:frontend.java from :compiler:fir:jvm 2020-09-04 11:42:51 +03:00
Dmitriy Novozhilov 6906e0d82d Move common jvm classes from :core:descriptors.jvm to :core:compiler.common.jvm 2020-09-04 11:42:51 +03:00
Dmitriy Novozhilov 9806a85cc1 Move Java model classes to :core:compiler.common.jvm 2020-09-04 11:42:51 +03:00
Dmitriy Novozhilov b81c0e91d5 Replace DescriptorVisibility with Visibility in Java model classes 2020-09-04 11:42:51 +03:00