Toshiaki Kameyama
62e335ac88
Implement members: fix it works correctly for data class
...
#KT-36686 Fixed
2020-02-23 22:00:38 +01:00
Toshiaki Kameyama
d54a35ef56
Add "Remove argument" quick fix for TOO_MANY_ARGUMENTS
...
#KT-34026 Fixed
#KT-34332 Fixed
2020-02-23 10:17:10 +01:00
Toshiaki Kameyama
699ea0aa2b
Replace 'if' with 'when': don't swallow comments if there is no synthetic else branch
...
#KT-34640 Fixed
2020-02-22 16:50:37 +01:00
Toshiaki Kameyama
f487118be5
Change signature: fix it works correctly when call site function has no value argument list
...
#KT-23510 Fixed
2020-02-22 09:07:34 +01:00
kvirolainen
90cfa80683
KT-27601 keep imports for extension functions used in kdoc
2020-02-22 08:55:50 +01:00
Toshiaki Kameyama
e56abcbb85
Inline variable: fix it works correctly for 'when' subject variable
...
#KT-29870 Fixed
2020-02-21 17:30:13 +01:00
Toshiaki Kameyama
d8ab046136
Convert property to function: remove annotation use-site target
...
#KT-36834 Fixed
2020-02-21 17:03:26 +01:00
Toshiaki Kameyama
d5e71ebef1
Invert if condition intention: 'isEmpty' <-> 'isNotEmpty'
...
#KT-34593 Fixed
2020-02-21 16:39:35 +01:00
Toshiaki Kameyama
79c15e49b6
Convert function to property: suggest on fun keyword
...
#KT-34450 Fixed
2020-02-21 16:32:17 +01:00
Toshiaki Kameyama
820b8c3c54
Introduce "Redundant '?: return null'" inspection
...
#KT-34819 Fixed
2020-02-21 16:24:42 +01:00
Toshiaki Kameyama
5f1cc3b152
Introduce "Redundant 'inner' modifier" inspection
...
#KT-3262 Fixed
2020-02-21 16:12:49 +01:00
Toshiaki Kameyama
3398683093
Unused symbol: do not report for secondary constructor when class is used as typealias
...
#KT-20907 Fixed
2020-02-21 15:11:38 +01:00
Toshiaki Kameyama
a3252b9480
Unused symbol: fix false positive in anonymous object in top level or companion object
...
#KT-31800 Fixed
#KT-20868 Fixed
2020-02-21 14:36:18 +01:00
Toshiaki Kameyama
ef1e54eda9
ReplaceToStringWithStringTemplateInspection: insert curly braces if needed
...
#KT-36735 Fixed
2020-02-21 14:28:07 +01:00
Toshiaki Kameyama
c87bc2123c
Add "Change to val" quick fix for MUST_BE_INITIALIZED
...
#KT-15723 Fixed
2020-02-21 14:09:54 +01:00
Toshiaki Kameyama
19093e2e02
Redundant companion reference: fix false positive when companion has same name member as companion name
...
#KT-36707 Fixed
2020-02-21 13:57:04 +01:00
Roman Golyshev
4042214bb2
Fix tests broken by enhanced RedundantSamConstructor inspection
...
- The inspection now works in more cases, so the test data had to be
updated accordingly
2020-02-20 17:27:41 +03:00
Vladimir Ilmov
7efb32628e
[Highlight] Fix for coloring annotation attributes in Kotlin
...
#KT-36156 Fixed
2020-02-20 11:51:42 +01:00
Mikhail Glukhikh
e051251b27
FIR: set isOperator only for Java methods with appropriate names
...
#KT-35133 Fixed
2020-02-19 18:09:04 +03:00
Denis Zharkov
a6cf16ddfc
FIR: Fix test data for FirMultiModuleResolveTestGenerated
2020-02-19 17:21:11 +03:00
Roman Golyshev
46ae6136cb
Rewrite RedundantSamConstructorInspection to support more cases
...
- Now inspection does not rely on synthetic descriptors at all, instead
it uses `SamConversionOracle` and `SamConversionResolver` to detect
if the argument type support SAM conversion
- This transparently considers all language features like
`SAM conversions for kotlin functions`, `Functional interfaces` etc.
- In case of multiple SAM arguments, part of them can be converted only
when `SAM conversion per argument` is enabled
- Fix inspection and nj2k tests that were failing because of better
working inspection
- Rewrite automatically fixes multiple bugs that were present
- ^KT-36367 ^KT-36368 ^KT-36296 ^KT-36395 Fixed
2020-02-19 17:16:17 +03:00
Roman Golyshev
3122760c49
Add more tests for RedundantSamConstructorInspection
...
- All those tests already pass, they are needed to fix the behaviour of the inspection before the changes
2020-02-19 17:16:17 +03:00
Pavel Kirpichenkov
2ead2fba08
[IDEA-TESTS] Update quickfix test parameters for 1.4
...
Tests check language feature `ProhibitVarargAsArrayAfterSamArgument`
2020-02-18 11:19:18 +03:00
Dmitry Savvinov
baa2c56e2d
Force-set path to exact project for MPP run configurations
...
Otherwise, path will be set to the root project. Given that we provide
task names in relative form rather than absolute, that will lead to
launching this task in all subprojects (e.g. task 'jvmTest'). This might
be a huge issue, because when we create run configuration for specific
test method/class, we pass test filter as well. This test filter will
execute in all projects with matched test tasks, so if some other
subproject has similarly-named test task, but doesn't have a suitable
tests for that filter, the whole build will fail.
Note that the ideal fix would involve using fully-qualified task names:
the current approach might lead to isses in advanced scenarious (e.g.
when user selects several test files from different modules -- then, we
won't be able to find one exact project path for the whole test run)
^KT-35038 Fixed
2020-02-17 20:05:50 +03:00
Dmitry Savvinov
cc2884b8ae
Add test on multiplatform run configurations in multiproject build
...
The current behaviour is undesired, see next commit for fix
2020-02-17 20:05:50 +03:00
Vladimir Dolzhenko
c9ed27e674
KT-36685 "Convert to a range check" transform hex range to int if it is compared with "Less" or "Greater"
...
#KT-36685 Fixed
2020-02-17 14:43:37 +01:00
Mikhail Zarechenskiy
70d416cafd
Remove test that become useless after enabling NI everywhere
...
It checked that with default settings new inference is enabled in IDE
and SAM conversions are _disabled_. Now this is useless as NI is
enabled everywhere
2020-02-17 12:38:22 +03:00
Pavel Kirpichenkov
fda8d7de8b
[IDEA-TESTS] Specify language version in feature-dependent tests
...
Some quickfixes are relying on diagnostics, that won't be reported
with new language features enabled.
`MixedNamedArgumentsInTheirOwnPosition`
`AllowBreakAndContinueInsideWhen`
2020-02-17 10:56:46 +03:00
Roman Golyshev
3461effd47
KT-33372 Remove renaming file reference to the contents of the file
...
- There is still a hack with returning null from `getLastFileReference`,
it is here to keep KT-25674 issue fixed
- Overrides of `bindToElement` are removed, they caused renames of the
file references to their contents
- Code of `KotlinFilePathReferenceContributor.kt` is refactored
- ^KT-33372 ^KT-32514 ^KT-36306 Fixed
2020-02-16 17:08:11 +03:00
Toshiaki Kameyama
7f2cf571b0
Convert to range check: do not transform binaries/hexadecimals to decimals
...
#KT-36685 Fixed
2020-02-16 15:56:44 +09:00
Dmitriy Novozhilov
e696d1d06a
[FIR] Improve mapping arguments to parameters
2020-02-14 17:53:28 +03:00
Ilya Chernikov
6356807997
Reapply "Only create descriptors for candidates with lambda args"
...
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
2020-02-14 11:41:30 +01:00
Toshiaki Kameyama
0c9720f20c
ReplaceGetOrSetInspection: do not report for 'get' with spread operator
...
#KT-36171 Fixed
2020-02-14 08:47:10 +03:00
Dmitry Gridin
f8a21340d0
ProhibitRepeatedUseSiteTargetAnnotationsMigrationInspection: add test
...
#KT-36257
2020-02-13 13:51:33 +07:00
Valentin Kipyatkov
e7c72637a1
Removed misleading comments from test data
2020-02-13 07:40:37 +02:00
Valentin Kipyatkov
b1cd56ba91
We must check super property usages also when analyzing inflow
2020-02-13 07:40:34 +02:00
Valentin Kipyatkov
ff516cac73
Do not include overriders when analyzing parameter usages unless invoked on parameter
2020-02-13 07:40:33 +02:00
Valentin Kipyatkov
b406d85ca3
Analyze Data Flow to Here: Java super-methods supported
2020-02-13 07:40:33 +02:00
Valentin Kipyatkov
cfa1d91aa4
Analyze Data Flow to Here to work with virtual methods
2020-02-13 07:40:33 +02:00
Pavel Kirpichenkov
572dee6835
Revert "Only create descriptors for candidates with lambda args"
...
This reverts commits:
349d07ad43
2249c223fe
Revert due to differences in test data with NI enabled
^KT-36247 Open
2020-02-12 20:52:30 +03:00
Igor Yakovlev
9e05c702ab
Fix KtDotQualifiedExpressionElementType stub building for complex qualified elements
...
Fixed #EA212081
2020-02-12 18:59:35 +03:00
Toshiaki Kameyama
3ebad2acec
"Constructor has non-null self reference parameter": don't report for vararg parameter
...
#KT-36160 Fixed
2020-02-12 16:35:26 +03:00
Toshiaki Kameyama
6c93217539
Lift assignment out: don't report when expression is used as expression
...
#KT-36357 Fixed
2020-02-12 16:17:25 +03:00
Toshiaki Kameyama
8baba38099
"To raw string literal" intention: fix false negative with string content starts with newline symbol \n
...
#KT-36369 Fixed
2020-02-12 16:15:18 +03:00
Vladimir Dolzhenko
a0ed2c8640
Enforce analysis inside top-level property initializer
...
Relates to #KT-36460
2020-02-11 16:47:10 +01:00
Igor Yakovlev
48db96b66d
Improved kotlin decompiler range indexes
...
Fixed #KT-30628
2020-02-11 17:42:12 +03:00
Toshiaki Kameyama
cb1c0344b8
Rename: add test for overridden method renaming in generic class
...
#KT-26047 Fixed
2020-02-11 17:25:12 +03:00
Toshiaki Kameyama
ff76ba52d8
Inline Function: fix false positive with inner function with 'return'
...
#KT-34190 Fixed
2020-02-11 16:23:57 +03:00
Toshiaki Kameyama
4b5f3b7a94
Extract property: do not add unnecessary extension receiver
...
#KT-24615 Fixed
2020-02-11 15:52:47 +03:00
Ilya Kirillov
0fe5694cb7
Do not render redundant Nullable annotations when generating declarations
...
#KT-36321 fixed
2020-02-11 13:48:58 +03:00