Alexander Udalov
45190d9453
Support separate modules in compiler
...
Unless the compatibility option "-Xsingle-module" is passed, the compiler will
create two modules instead of one now (see TopDownAnalyzerFacadeForJVM): the
main module contains Kotlin and Java sources and binaries from the previous
compilation of the given module chunk, the dependency module contains all other
Kotlin and Java binaries. This fixes some issues where the compiler couldn't
detect that the used symbol was from another module, and did not forbid some
usages which are only possible inside the module (see KT-10001).
The ideal way to deal with modules here would be to exactly recreate the
project structure, for example as it's done in JvmAnalyzerFacade and usages.
This is postponed until later
#KT-10001 Fixed
#KT-11840 In Progress
2016-10-02 21:15:47 +03:00
Alexander Udalov
3314725700
Pass GlobalSearchScope instance to JvmPackagePartProvider
...
Currently behavior is unchanged because the "all project" scope is passed,
however in the future this will allow to implement separate modules in the
compiler properly
2016-10-02 21:03:37 +03:00
Alexander Udalov
97f2051a03
Add debugName to ModuleMapping
2016-10-02 21:03:33 +03:00
Alexander Udalov
a5a874f23f
Move module creation into TopDownAnalyzerFacadeForJVM#analyzeFilesWithJavaIntegration
...
The only place where the logic has changed is in AbstractDiagnosticsTest, where
modules are already created and sealed before the analysis. Copy-paste the
container creation logic there (it's almost fine because it's also present in a
bunch of other tests), and simplify it: get rid of incremental compilation and
other stuff irrelevant for diagnostic tests.
This is needed to make analyzeFilesWithJavaIntegration configure the module
properly before sealing it
2016-10-02 21:03:27 +03:00
Alexander Udalov
87fe6c41df
Drop ExternalDeclarationsProvider
...
It was added for Android extensions, but now another mechanism is used there
(PackageFragmentProviderExtension), and there were no other implementations of
ExternalDeclarationsProvider in the project
2016-10-02 21:03:19 +03:00
Valentin Kipyatkov
a55273646a
Fixed check for convention operator
2016-09-30 21:37:48 +03:00
Valentin Kipyatkov
57faa5a39a
Term changes
2016-09-30 21:37:48 +03:00
Valentin Kipyatkov
769943061e
Changed String to Name
2016-09-30 21:37:47 +03:00
Valentin Kipyatkov
17adee68cd
Fixed optimize imports for operators
2016-09-30 21:37:47 +03:00
Valentin Kipyatkov
95a3a29382
Optimize imports to prevent accedential changes in resolve because of import priorities
...
#KT-11640 Fixed
2016-09-30 21:37:47 +03:00
Valentin Kipyatkov
7628fa1608
Checked that KT-13766 Fixed by some changes in resolve
...
#KT-13766 Fixed
2016-09-30 21:37:46 +03:00
Valentin Kipyatkov
f4c65da8f1
Minor
2016-09-30 21:37:46 +03:00
Mikhail Glukhikh
ee5202f2ea
Minor refactoring: convert secondary constructor to primary
...
(cherry picked from commit 47446b7)
2016-09-30 16:40:19 +03:00
Mikhail Glukhikh
e417a85276
Minor: secondary constructor to primary is suggested only on keyword and value parameter list
...
(cherry picked from commit 9a3e6d3)
2016-09-30 16:40:08 +03:00
Mikhail Glukhikh
0a4542c6c0
KT-9839 related, secondary constructor to primary: inspection for the single constructor
...
(cherry picked from commit aec0090)
2016-09-30 16:39:58 +03:00
Mikhail Glukhikh
3508bea391
KT-9839 related, primary constructor to secondary: comment restoration
...
(cherry picked from commit 48a1853)
2016-09-30 16:39:46 +03:00
Mikhail Glukhikh
d1958be2a8
KT-9839 related, secondary constructor to primary: comment restoration
...
(cherry picked from commit 998e39e)
2016-09-30 16:39:36 +03:00
Mikhail Glukhikh
725df49c8c
KT-9839: intention introduced: convert secondary constructor to primary one #KT-9839 Fixed
...
(cherry picked from commit f3fa779)
2016-09-30 16:39:24 +03:00
Mikhail Glukhikh
28b70faa99
KT-9839: convert primary constructor to secondary one: leave independent properties in class body as is
...
(cherry picked from commit b90414a)
2016-09-30 16:39:13 +03:00
Mikhail Glukhikh
7f50e6e70e
KT-9839: intention introduced: convert primary constructor to secondary one
...
(cherry picked from commit 93aaa48)
2016-09-30 16:39:01 +03:00
Denis Zharkov
d4418d5686
Prohibit not-Unit suspend functions
...
#KT-13560 Fixed
2016-09-30 12:25:59 +03:00
Denis Zharkov
96186c6217
Prohibit star-projections in last parameter of suspend functions
2016-09-30 12:25:59 +03:00
Simon Ogorodnik
18feb8f622
Return Kotlin fields and methods through KotlinShortNameCache
...
#KT-12205 Fixed
2016-09-28 13:36:20 +02:00
Simon Ogorodnik
b06bdcef75
Now possible to use // WITH_RUNTIME in multi file tests
2016-09-28 13:36:07 +02:00
Alexey Sedunov
956c6eeec7
Push Down: Support moving members from Java to Kotlin class
...
#KT-9485 Fixed
2016-09-27 21:26:31 +03:00
Alexey Sedunov
924bb44862
Pull Up/Push Down/Extract Super: Support references to Java-declared superinterfaces
2016-09-27 21:26:30 +03:00
Alexey Sedunov
22271f0af0
Pull Up/Push Down/Extract Super: Show member dependencies in the refactoring dialog
2016-09-27 21:26:29 +03:00
Alexey Sedunov
8a5628cde5
Pull Up/Extract Super: Support members declared in the companion object of the original class
2016-09-27 21:26:28 +03:00
Alexey Sedunov
982d4d4ead
Pull Up/Extract Super: Support properties declared in the primary constructor
2016-09-27 21:26:27 +03:00
shiraji
3aedf0d79f
Add intention to replace Math.max/min with coerceAtLeast/coerceAtMost #KT-13945 Fixed
2016-09-27 20:05:11 +03:00
Mikhail Glukhikh
4522d2c7da
Remove unnecessary lateinit intention / inspection removed (supported in compiler CFA instead)
...
(cherry picked from commit e17f222)
2016-09-27 18:49:51 +03:00
Mikhail Glukhikh
67cc83af05
Quick-fix for UNNECESSARY_LATEINIT
...
(cherry picked from commit 77f7bb0)
2016-09-27 18:49:13 +03:00
Valentin Kipyatkov
b0ed6adce3
Fixed wrong test
2016-09-27 18:05:26 +03:00
Valentin Kipyatkov
6baf633a8d
Fixed bug found because of incorrect test fixed
2016-09-27 18:05:26 +03:00
Valentin Kipyatkov
21c2268f70
Protection against "<caret>" missing in test data
...
Many incorrect tests fixed
2016-09-27 18:05:26 +03:00
Valentin Kipyatkov
be8b31e82b
Removed redundant and confusing .after files in negative tests
2016-09-27 18:05:26 +03:00
Valentin Kipyatkov
038068aa44
KT-13953 Import member popup should not suggest methods when only property or variable is valid
...
#KT-13953 Fixed
2016-09-27 18:05:25 +03:00
Alexey Sedunov
ca482c32c6
Introduce Variable: Fix exception on trying to extract variable of functional type
...
#KT-14004 Fixed
2016-09-27 13:27:56 +03:00
Alexey Sedunov
06936328ab
Remove Redundant Receiver Parameter: Do not run refactoring inside write action
...
#KT-13878 Fixed
2016-09-27 13:27:55 +03:00
Alexey Sedunov
698660b9c6
Find Usages: Add special type for usages inside of type aliases
...
#KT-13955 Fixed
2016-09-27 13:27:54 +03:00
Pavel V. Talanov
b275dacad8
Light classes: getOwnInnerClasses() filters out inner classes with null names
...
#KT-13927 Fixed
2016-09-26 19:51:57 +03:00
Pavel V. Talanov
827b56e277
Navigation to binaries: support navigation to type alias constructors
...
#KT-13479 Fixed
2016-09-26 18:34:19 +03:00
Ilya Gorbunov
35839695f7
Fix decompiled text consistency test to handle type aliases in JS.
...
by Alexey Andreev <Alexey.Andreev@jetbrains.com >
2016-09-24 07:08:21 +03:00
Ilya Gorbunov
c508f75de4
Test data: change fully qualified type so that it's available as type (and not an alias) in both jvm and js runtimes to have the same output.
2016-09-24 07:08:21 +03:00
Ilya Gorbunov
b741c82a66
Fix completion tests after moving collection types in JS
2016-09-24 07:08:21 +03:00
Nikolay Krasko
0abf94c2f4
Allow to avoid rebuilding application in debugger tests on local machine
...
(cherry picked from commit 8b899a7)
2016-09-24 01:44:40 +03:00
gitreelike
06c804787f
Implement quick fix to convert a too long char literal to a string #KT-13635 Fixed
2016-09-23 13:04:41 +03:00
shiraji
391a0fdde5
Add "Copy concatenation text to clipboard" intention #KT-13744 Fixed
2016-09-23 12:46:22 +03:00
Valentin Kipyatkov
023c02deb3
Corrections on code review
2016-09-23 10:07:15 +03:00
Valentin Kipyatkov
e4f80e277f
Better texts of change variable type quickfixes
2016-09-23 10:07:15 +03:00