Dmitry Gridin
3ea195e1a2
DescriptorRenderedImpl: fix order of val & vararg modifier for actual class
...
#KT-31921 Fixed
2019-08-01 16:08:45 +03:00
Dmitry Gridin
4e2989e884
CreateExpectActualFix: fix package for files with root package from non-root directory
...
#KT-28746 Fixed
2019-07-23 16:24:43 +03:00
Dmitry Gridin
c76ca988eb
KotlinCreateTestIntention: disallow intention for expect classes
...
#KT-26242 Fixed
2019-07-23 16:24:16 +03:00
Mikhail Glukhikh
5f896936ae
Fix broken test (related to "Convert to lazy property")
2019-06-17 11:06:38 +03:00
Dmitry Savvinov
cac326bf4a
[Expect/Actual] Adjust old testdata after changes in expect/actual
...
matching
This commit makes several changes in testdata:
- compiler multiplatform tests now contain newly introduced diagnostics
about AMBIGIOUTS_ACTUALS
- MultiModuleHighlighitng tests now contain proper reports about
ACTUAL_MISSING:
- ACTUAL_MISSING should be indeed reported in them, because those
tests don't contain dependsOn edges, only usual intermodule
dependencies
- This error wasn't reported here because expect/actual diagnostics in
common module used to be reported by PlatformExpectedAnnotator, which
had a bit flawed logic for deremining common-modules: it checked for
presence of implementing modules. In those tests, common module has no
implementing modules, so Annotator was returning silently
Note that such configurations (common module without implementing
modules) are almost impossible in real-life projects
- After removal of PlatformExpectedAnnotator, we use
ExpectedActualDeclarationChecker in common modules, which launches all
checks properly
- some QuickFixMultuModuleTests now contain proper reports about
ACTUAL_MISSING. This change is also connected with
PlatformExpectedAnnotator, but now for different reason:
- QuickFixMultiModuleTest used to check for errors in file by running
'analyzeWithAllCompilerChecks' and inspecting returned BindingTrace.
For common modules, there were no diagnostics about expect/actuals in
that trace, because there were no ExpectedActualDeclarationChecker
(and PlatformExpectedAnnotator was reporting diagnostics in ad hoc
trace).
- Again, now we inject EADC in common modules properly, so we see
those errors in trace and report them in test
2019-06-10 13:34:27 +03:00
Dmitry Savvinov
de2944ff43
[Misc] Fix errors checking in QuickFixMultiModuleTest
...
This test was checking errors *before* applying action, rather than
*after*, like all other QuickFix-tests do. This commit moves
errors-check after performing quick-fix action, and changes testdata:
- for most tests errors are simply gone (as quickfix usually fixes that
error)
- also, for implementMembersInActualClassNoExpectMember we add
'DISABLE-ERROR', similarly to
implementMembersInImplClassNonImplInheritor. This is needed because
'Implement Members'-fix created 'TODO'-calls, which are not resolved in
those tests due to the lack of stdlib. Previously, there were no errors
in this test exactly because file was checked *before* applying quickfix
(i.e. when there were no 'TODO()' in file)
2019-06-10 13:34:27 +03:00
Dmitry Gridin
afa9a80b3a
Fix multi module tests for AddOperatorModifierInspection
2019-06-06 12:09:28 +07:00
Dmitry Gridin
605ee041a9
Remove CreateTypeAliasFromUsageFix
...
Relates to #KT-31519
2019-05-31 18:00:56 +07:00
Dmitry Gridin
f2bd58c030
Expand "Create expected..." also to a members if an expect class doesn't exist
...
#KT-31272 Fixed
2019-05-24 15:55:01 +07:00
Dmitry Gridin
47e3a26749
Fix "Create expect function" for primary constructor
...
#KT-31518 Fixed
2019-05-24 15:55:01 +07:00
Dmitry Gridin
b575ed390a
Add a dialog to select members for export in expect class
...
#KT-31476 Fixed
#KT-31446 Fixed
#KT-31033 Fixed
2019-05-24 15:55:01 +07:00
Dmitry Gridin
98a4c4588e
Don't suggest might be const on actual member declaration
...
#KT-27822 Fixed
2019-05-24 15:55:00 +07:00
Dmitry Gridin
3ca1c7b55d
"Convert property to function" intention should warn about the property overloads at child class constructor
...
#KT-29764 Fixed
2019-04-02 22:53:56 +07:00
Dmitry Gridin
dce2139eb0
Fix KNPE from "Create" quick fix
...
#KT-27289 Fixed
2019-03-04 13:01:18 +03:00
Mikhail Glukhikh
ca3d758fba
Create expect/actual class: fix inline class generation
...
#KT-28744 Fixed
#KT-28745 Fixed
2018-12-19 19:55:56 +03:00
Mikhail Glukhikh
8fb213021c
Create expect: remove false positive in inaccessible type detector
2018-11-28 12:36:29 +03:00
Mikhail Glukhikh
d3fada89b7
Generate enum entries in create actual / expected fixes as all other
...
This makes code a bit cleaner
2018-11-28 12:00:54 +03:00
Mikhail Glukhikh
2af9efa4a0
Fix failing test (related to KT-28381, KT-28382 commits)
2018-11-23 15:43:39 +03:00
Mikhail Glukhikh
1585461a68
Fix create expected for classes with anonymous initializers
2018-11-21 15:13:02 +03:00
Mikhail Glukhikh
99388c304f
Fix create expected for non-actual nested class case
2018-11-21 15:13:02 +03:00
Mikhail Glukhikh
a4214f13c8
Forbid create expected on class member when class has no expected itself
...
Related to KT-27075
2018-11-21 15:13:01 +03:00
Mikhail Glukhikh
8b7c7dbe25
Create expected quick-fix: check types accessibility before creation
...
Related to KT-27075
2018-11-21 15:13:01 +03:00
Mikhail Glukhikh
f31428257d
Add a set of new tests for KT-27075 (create expected class) + some fixes
2018-11-21 15:13:01 +03:00
Mikhail Glukhikh
2277dcc76f
Introduce quick-fix "create expected class / function / property"
...
#KT-27075 Fixed
2018-11-21 15:13:01 +03:00
Mikhail Glukhikh
5c6f776c09
Add actual: handle already existing declarations more precisely
...
#KT-23693 Fixed
2018-11-21 15:13:00 +03:00
Mikhail Glukhikh
46a5d76254
Create actual: add delegation to secondary constructor, if needed
...
#KT-26518 Fixed
2018-11-21 15:13:00 +03:00
Mikhail Glukhikh
90a2f70fd1
Use OverrideMemberChooserObject to generate also primary constructors
...
Relates to KT-27093 and similar problems
2018-11-21 15:13:00 +03:00
Mikhail Glukhikh
cd041cca71
Use OverrideMemberChooserObject to generate also abstract actual decls
...
Relates to KT-27093 and similar problems
2018-11-21 15:13:00 +03:00
Mikhail Glukhikh
3612c2983e
Use OverrideMemberChooserObject to generate actual decls in quick-fixes
...
This can fix a lot of issues related to inexact generation, in particular
#KT-27093 Fixed
2018-11-21 15:12:59 +03:00
Mikhail Glukhikh
cb28387da4
Fix KNPE in different "Generate members" for expect class
...
#KT-27595 Fixed
2018-11-13 10:15:48 +03:00
Mikhail Glukhikh
fcfeb33501
Don't suggest "Implement as constructor parameters" in actual class
...
This applies if expect class has primary constructor declared
#KT-27791 Fixed
2018-11-07 11:56:55 +03:00
Mikhail Glukhikh
29390dab42
Create actual: use analyzeWithContent to resolve annotations correctly
...
So #KT-26626 Fixed
2018-09-07 14:56:16 +03:00
Mikhail Glukhikh
74c5d8ed09
Create actual: do not generate default parameter values in constructor
...
So #KT-26517 Fixed
2018-09-07 14:56:13 +03:00
Mikhail Glukhikh
53e7778078
Add modifiers on the same line even after annotation #KT-26492 Fixed
2018-09-05 13:05:08 +03:00
Mikhail Glukhikh
4dd95e5640
Introduce OptionalExpectationInspection
...
It works at INFORMATION level only and is intended to form quick-fixes
to add relevant actual declarations.
#KT-25533 Fixed
2018-09-05 13:05:07 +03:00
Mikhail Glukhikh
df125702c1
Test for KT-25040 (just to stabilize behaviour)
2018-09-05 13:05:07 +03:00
Toshiaki Kameyama
1898df3fb7
Introduce "Convert property getter to initializer" intention
...
#KT-13854 Fixed
2018-08-14 15:32:20 +03:00
Mikhail Glukhikh
db787c78d6
Implement members: don't add 'actual' modifier for fake overrides
...
#KT-25044 Fixed
2018-08-09 12:59:58 +03:00
Mikhail Glukhikh
ed5791ed9e
Introduce "remove actual" fix for ACTUAL_WITHOUT_EXPECT
...
Related to KT-25044
2018-08-09 12:59:57 +03:00
Mikhail Glukhikh
14d6560e67
Add modality/visibility/inline to all expect/actual declarations in QF
...
So #KT-25539 Fixed
2018-07-26 18:01:01 +03:00
Mikhail Glukhikh
fdc0335b4a
Add actual: handle (incorrect) case with expect function with body
...
So #KT-23326 Fixed
2018-06-29 10:54:37 +03:00
Mikhail Glukhikh
0fb183e302
Add actual: handle parameters with val/var as compatible with property
...
So #KT-23762 Fixed
2018-06-29 10:54:36 +03:00
Mikhail Glukhikh
dd0b267531
Add actual: handle primary & secondary constructors as compatible
...
So #KT-23686 Fixed
2018-06-29 10:54:35 +03:00
Mikhail Glukhikh
16c6d63b10
Create actual: do not generate default parameter values
...
So #KT-23105 Fixed
2018-06-29 10:54:32 +03:00
Mikhail Glukhikh
aac71bf904
Safe delete: when invoking on actual, delete expect & actual neighbors
...
So #KT-15666 Fixed
2018-06-29 10:54:24 +03:00
Mikhail Glukhikh
eb92b7ed7f
Unused symbol: don't suggest actual declaration used in another platform
...
Related to KT-17512
Related to KT-15666
2018-06-26 15:36:10 +03:00
Mikhail Glukhikh
7e0e7dc983
Unused symbol: remove forced "used" from actual declarations
...
Now we really check whether actual declaration has usages
(in expect or actual code) or not
Related to KT-17512
Related to KT-15666
2018-06-26 15:36:07 +03:00
Alexey Sedunov
ed8b4b761a
Override/Implement: Add 'actual' modifier to overrides of 'expect'
...
#KT-23106 Fixed
2018-06-19 12:22:40 +03:00
Pavel V. Talanov
1be477c816
Fix "add member" quick fix when invoked from java on common class
...
#KT-24115 Fixed
2018-06-06 21:03:56 +02:00
Pavel V. Talanov
a4e327c137
Mpp: KT-23457, fix importing common classes into common modules
...
Add test for KT-23457
NOTE: fixes 'importClassInCommon' test
Other test cases added to increase coverage
#KT-23457 Fixed
2018-04-26 15:33:51 +02:00