Dmitry Gridin
23beaa5883
[formatter] add tests for line indent after properties
...
^KT-42560
2020-10-09 20:03:48 +07:00
Dmitry Gridin
434139d986
Revert "Add indent before accessor for extension property (KT-33131)"
...
This reverts commit ab34f8c7
^KT-42560 Fixed
2020-10-09 19:44:50 +07:00
Dmitry Savvinov
f50851a982
Fix testdata after migrating to NewKotlinTypeCheckerImpl in OverrideResolver
...
- In kt10409 both 'pipe'-declarations contain error type.
NewKotlinTypeChecker in OverrideResolver considers error types as equal,
thus they are matched as bound declarations, thus 'IterablePipeline'
isn't considered to contain abstract member, thus no suggestion to add
abstract modifier.
Because initially test was covering purely technical issue of working
with error types, instead of removing it completely the additional
abstract member has been added
- in kt10808 we don't add explicit type anymore because
'noTypeInference' is false, because both expected type and actual type
are error-types, and KotlinIntroduceVariableHandler explicitly uses type
checker with 'errorTypesEqualToAnything=false'.
Also, this change might be ultimately seen as small improvement, because
if one extracts something with error type, they would certainly prefer
it to have a proper type as soon as errors are resolved (i.e. additional
code/imports written), rather than having a useless Any-type.
2020-10-09 13:44:06 +03:00
Dmitry Savvinov
01d6181050
Add test on overriding declaration with a composite type with expect declaration
2020-10-09 13:44:06 +03:00
Dmitry Savvinov
ac63d8b3bf
Unify code for checking return type on override for fun/property
...
This fixes issues with the refinement of property' return type because
for functions' return type we already perform refinement properly
2020-10-09 13:44:05 +03:00
Dmitry Savvinov
736ecf3e9f
Add test case on overriding property of expect-type
...
Current behaviour is undesired, the fix is in the next commit
2020-10-09 13:44:05 +03:00
Dmitry Savvinov
ac107f362e
Refine types of type parameters before checking their equality in OverridingUtil
2020-10-09 13:44:05 +03:00
Dmitry Savvinov
80f4061a3d
Add test on override with expect in return type
2020-10-09 13:44:04 +03:00
Ilya Kirillov
efef18c2ca
FIR IDE: mute not passing highlighting test
2020-10-07 19:45:02 +03:00
Dmitry Gridin
9a0c3c47c8
[inspections] fix false positive "Redundant Unit" inspection in lambda with dynamic return type
...
^KT-40700 Fixed
2020-10-07 08:38:28 +00:00
Vladimir Dolzhenko
5eac949b43
Report EXPLICIT_DELEGATION_CALL_REQUIRED on relevant element
...
^KT-38959 Fixed
2020-10-05 09:43:05 +00:00
Dmitry Gridin
3078bd7b67
[formatter] line indent provider: fix indent for empty braces
...
^KT-42411 Fixed
2020-10-05 07:27:53 +00:00
Toshiaki Kameyama
bcbb90dd81
"Receiver parameter is never used" inspection: don't report it when anonymous function is called with receiver
...
#KT-41246 Fixed
2020-10-02 13:32:31 +07:00
Toshiaki Kameyama
33969c5f9a
Redundant semicolon: fix false negative on start of line
...
^KT-40704 Fixed
2020-10-01 14:31:59 +02:00
Toshiaki Kameyama
86ac44c23e
"Replace 'if' with elvis operator": don't suggest if val initializer is a complex expression
...
#KT-35165 Fixed
2020-09-29 23:58:29 +09:00
Toshiaki Kameyama
653e20dcba
Convert put to assignment: don't report when receiver object has custom 'set' method
...
#KT-33212 Fixed
2020-09-29 23:58:29 +09:00
Toshiaki Kameyama
5abb6bc7a5
Add quickfix for SENSELESS_NULL_IN_WHEN to remove redundant when branch
...
#KT-24556 Fixed
2020-09-29 23:58:29 +09:00
Toshiaki Kameyama
668473c337
Add quickfix for CONST_VAL_NOT_TOP_LEVEL_OR_OBJECT to remove const modifier
...
#KT-35215 Fixed
2020-09-29 23:58:28 +09:00
Toshiaki Kameyama
5a3c6def8f
Join with assignment: fix false negative when local variable are used
...
#KT-34270 Fixed
2020-09-29 23:58:28 +09:00
Toshiaki Kameyama
b56272dc64
Add name to argument: do not remove necessary backticks
...
#KT-30894 Fixed
2020-09-29 23:58:28 +09:00
Toshiaki Kameyama
a492fe7757
"Put arguments/parameters on separate lines": respect code style settings
...
#KT-20420 Fixed
2020-09-29 23:58:27 +09:00
Toshiaki Kameyama
74ee68e57b
Remove redundant backticks: do not report if variable inside the string and isn't followed by space
...
#KT-35051 Fixed
2020-09-29 23:58:27 +09:00
Toshiaki Kameyama
ad3ea9a36a
Replace with binary operator: don't highlight when receiver is platform type
...
#KT-35097 Fixed
2020-09-29 23:58:27 +09:00
Toshiaki Kameyama
93db78e7ac
JavaMapForEachInspection: report for expression with implicit receiver
...
#KT-31833 Fixed
2020-09-29 23:58:27 +09:00
Toshiaki Kameyama
75e8849c94
Add quick fix for INLINE_CLASS_CONSTRUCTOR_NOT_FINAL_READ_ONLY_PARAMETER
...
#KT-34533 Fixed
2020-09-29 23:58:26 +09:00
Yan Zhulanow
9f192ba85e
Fix false positive in +0.0 == -0.0 comparison simplification (KT-17735)
2020-09-29 23:58:26 +09:00
Toshiaki Kameyama
915dc6ce91
FoldInitializerAndIfToElvisInspection: don't report when 'var' variable has no explicit type and it's used as not nullable type
...
#KT-38349 Fixed
2020-09-29 23:58:26 +09:00
Toshiaki Kameyama
ef5335ba99
ReplaceJavaStaticMethodWithKotlinAnalogInspection: don't report for Character.toString(int)
...
#KT-34859 Fixed
2020-09-29 23:58:25 +09:00
Toshiaki Kameyama
b008e6c9be
SimplifiableCallChainInspection: don't report if suspend function cannot be called correctly
...
#KT-23934 Fixed
2020-09-29 23:58:24 +09:00
Nikolay Krasko
2df030f583
as42: Apply 201 <-> AS41 diff
2020-09-29 15:32:32 +03:00
Toshiaki Kameyama
330502a0a6
KT-22665 "Create object" quick fix produce wrong code for enum ( #2883 )
...
* "Create object" quick fix: do not suggest for enum
#KT-22665 Fixed
2020-09-28 14:02:10 +02:00
Toshiaki Kameyama
bc580d2fd9
Introduce "Unused result of data class copy" inspection
...
#KT-34121 Fixed
2020-09-25 17:18:41 +02:00
Igor Yakovlev
d2bdab2ef5
[FIR IDE] Add find usages tests for FIR plugin
2020-09-25 17:26:22 +03:00
Toshiaki Kameyama
37ba9eccc4
KT-31553 Complete Statement: Wrong auto-insertion of closing curly brace for a code block ( #2378 )
...
* Complete statement: wrap property initializer by run/when block
#KT-31553 Fixed
2020-09-25 16:04:03 +02:00
Toshiaki Kameyama
14bdcb1e26
"Create enum constant" quick fix: suggest if expected type is Any
...
#KT-22666 Fixed
2020-09-25 15:57:11 +02:00
Toshiaki Kameyama
a2f70dfc3d
KT-41298 "Remove redundant 'with' call" intention works incorrectly with non-local returns and single-expression functions ( #3713 )
...
* Remove redundant 'with' call: remove redundant 'return' keyword
#KT-41298 Fixed
2020-09-25 12:48:31 +02:00
Roman Golyshev
945edfe987
KT-41859 Place classes after typealiases in DeserializedMemberScope
...
This way, the order in stubs and in deserialized text would be the same
On the next stub version bump, this fix should be reworked: the order
in the `DeserializedMemberScope` should be restored, and the order in
the stubs should be fixed to match the order in `MemberComparator`
^KT-41859 Fixed
2020-09-25 09:03:12 +00:00
Toshiaki Kameyama
17176c00ae
Move lambda out: don't remove block comments
...
#KT-35357 Fixed
2020-09-24 12:05:43 +02:00
Yan Zhulanow
15b2850ee0
Parcelize: Add IDE support for the Parcelize compiler plugin with sources extracted from Android Extensions plugin (KT-40030)
2020-09-24 15:50:57 +09:00
Toshiaki Kameyama
4144adf4ee
Make internal: don't suggest in interface
...
#KT-35346 Fixed
2020-09-23 15:34:09 +02:00
Toshiaki Kameyama
a2bde2ffb2
Redundant overriding method: do not report when super method is not called
...
#KT-34959 Fixed
2020-09-23 14:12:06 +02:00
Toshiaki Kameyama
bdf502edef
Override/Implement members: don't add 'external' modifier
...
#KT-33466 Fixed
2020-09-23 11:51:08 +02:00
Toshiaki Kameyama
f20a6b7fe1
Change function signature: add/change receiver type
...
#KT-21799 Fixed
2020-09-22 18:07:24 +02:00
Toshiaki Kameyama
c09c0468d4
Replace deprecated symbol usage: move named lambda argument outside parentheses
...
#KT-31523 Fixed
2020-09-22 10:51:36 +02:00
Toshiaki Kameyama
d9cf4ee732
Add intention to evaluate compile time expression
...
#KT-40251 Fixed
2020-09-22 10:46:54 +02:00
Leonid Startsev
bc432ecb85
Improve remove/specify type intentions in Explicit API mode
...
Do not suggest to remove type for public declarations
#KT-38915 Fixed
Do not show intention to specify type when corresponding quickfix is available
#KT-39026 Fixed
2020-09-21 17:10:10 +03:00
Vladimir Dolzhenko
985f2b839c
Add regression tests to cover Unused symbol with private anonymous object property
...
^KT-39454 Fixed
2020-09-17 11:54:53 +02:00
Toshiaki Kameyama
0e4bd70c29
Redundant nullable return type: fix false positive with elvis return
...
#KT-41878 Fixed
2020-09-17 09:49:02 +02:00
Toshiaki Kameyama
370622087b
Redundant nullable return type: false negative with return expression in local function or lambda
...
#KT-41817 Fixed
2020-09-11 19:09:57 +02:00
Toshiaki Kameyama
de3907e8cc
Redundant nullable return type: fix false positive with non-local return
...
#KT-41800 Fixed
2020-09-11 19:09:57 +02:00