Commit Graph

861 Commits

Author SHA1 Message Date
Andrei Klunnyi 53a7dc1126 KT-44839 [Sealed interfaces]: restore move-tests for lang-version < 15
This commit restores tests removed in 690fb47c.
2021-02-15 15:28:00 +00:00
Andrei Klunnyi 690fb47cbb KT-44079 [Sealed Interfaces]: move refactoring update
The idea behind this commit is that Move Refactoring should warn
developers in case their intention potentially breaks sealed
hierarchies (members must share the same module and package).

Provided algorithm has two goals:
- prevent destruction of correct hierarchies
- help in fixing broken ones
2021-02-03 10:04:26 +00:00
Vyacheslav Gerasimov 8620d26a8a Delete 193 bunch files 2020-11-11 14:28:53 +03: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
Yunir Salimzyanov 27b2e16141 Cleanup as36 patchset files (KTI-315) 2020-08-19 19:40:00 +03:00
aleksandrina-streltsova 5515465760 Move: Support method moving 2020-08-19 12:11:53 +03:00
Igor Yakovlev 4707f4fc3f Change signature does not make doubled refactoring for java usages
Fixed #KT-22170
2020-07-06 11:54:36 +03:00
Dmitry Gridin 62e252ec26 Inline refactoring: should support set/get operator
#KT-17378 Fixed
2020-07-03 21:11:58 +07:00
Nikolay Krasko 21fa2bf98c Switch to 201 platform 2020-06-30 19:53:18 +03:00
Dmitry Gridin 30f98e6730 Inline refactoring: shouldn't lose return type information
#KT-26705 Fixed
2020-06-29 07:55:21 +00:00
Dmitry Gridin c3b726f10a Inline refactoring: should add explicit type argument for parameters
#KT-17402 Fixed
2020-06-29 07:55:20 +00:00
Dmitry Gridin 45234c9784 Inline refactoring: fix case with introduction of variable to return
#KT-39818 Fixed
2020-06-29 07:55:20 +00:00
Dmitry Gridin abfc74c8b2 Add regression test
#KT-30131 Fixed
2020-06-23 18:05:17 +07:00
Dmitry Gridin 99f958c8c4 Inline refactoring: should remove redundant Unit
#KT-19443 Fixed
2020-06-23 10:25:54 +00:00
Dmitry Gridin 360a5bf348 Inline refactoring: improve resolve
#KT-39705 Fixed
#KT-19459 Fixed
2020-06-23 10:25:52 +00:00
Dmitry Gridin 2610dedcbd KotlinUnusedImportInspection: support unresolved references
#KT-31331 Fixed
2020-06-23 09:48:07 +00:00
Toshiaki Kameyama cbbdec5898 Change Signature: enable on primary constructor keyword (#2482)
#KT-19744 Fixed
2020-06-11 12:10:12 +03:00
Nikita Bobko a94d2211e4 Cleanup getLineCount 2020-06-04 14:56:23 +03:00
Toshiaki Kameyama 82d81d5223 Change Signature: move lambda outside of parentheses if the arguments are reordered so that the lambda goes last
#KT-30128 Fixed
2020-05-15 17:58:33 +02:00
Dmitry Gridin 50506658c0 fix some tests for as36 2020-05-08 19:13:28 +07:00
Dmitry Gridin 11a3482970 tests: apply official code style
#KT-38632 Fixed
2020-05-07 12:36:44 +00:00
Dmitry Gridin ccfea97390 CopyKotlinDeclarationsHandler: fix for package with backticks
#KT-38543 Fixed
2020-05-04 03:49:30 +00:00
Dmitry Gridin 8e35b7a29c KotlinIntroduceVariableHandler: fix for declarations with expression body
#KT-38449 Fixed
2020-05-04 03:49:28 +00:00
Dmitry Gridin 2f015b4c7a Fix testKotlin_moveTopLevelDeclarations_movePrivatePropertyWithDefaultAccessors_MovePrivatePropertyWithDefaultAccessors test 2020-04-29 13:05:36 +07:00
Dmitry Gridin a11e6b2eed KotlinChangePackageRefactoring: fix formatting for long qualifier names
#KT-38627 Fixed
2020-04-28 12:37:18 +00:00
Dmitry Gridin db5751616a MoveKotlinDeclarationsProcessor: fix formatting for long qualifier names
#KT-35338 Fixed
2020-04-28 12:37:17 +00:00
Dmitry Gridin 585177bcf7 Formatter: fix indent for multiline expression in string template
#KT-35359 Fixed
2020-04-14 13:54:12 +00:00
Vladimir Dolzhenko b51ae78b84 Do not resolve alias imported references on rename
#KT-38096 Fixed
2020-04-09 20:38:01 +00:00
Valentin Kipyatkov 88cd129549 Fixed other parameter references broken in new parameter values in conventional Change Signature 2020-04-07 22:17:04 +03:00
Dmitry Gridin de1fa40c7e CodeInliner: fix KNPE
#KT-22733 Fixed
#KT-36225 Fixed
#EA-206694 Fixed
2020-04-04 00:46:15 +07:00
Igor Yakovlev b205b017fe Fixed references move refactoring for NonCode usages
We need to try correctly refactor NonCode usages of Java-like facade FQ names
i.e. if we have file A.kt with method foo we need to check AKt.foo and foo entries for non-code text search

Fixed #KT-36382
2020-03-30 13:51:27 +03:00
Toshiaki Kameyama a96cafe066 Extract property: do not suggest duplicate property name
#KT-36504 Fixed
2020-03-25 22:19:26 +01:00
Vladimir Dolzhenko e951f1a43a Find Usages and Go to declaration of element used via import alias
#KT-18619 Fixed
2020-03-20 14:59:24 +00: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
Toshiaki Kameyama e56abcbb85 Inline variable: fix it works correctly for 'when' subject variable
#KT-29870 Fixed
2020-02-21 17:30:13 +01: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 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 4df8744b34 Rename by-name parameter usage in function calls when renaming function's parameter
#KT-32999 fixed
2020-02-11 13:48:56 +03:00
Dmitry Gridin c34b417d0c Fix tests after disabling trailing comma
#KT-34744
2020-02-04 21:34:53 +07:00
Dmitry Gridin d06787886a Fix tests after implementing trailing comma in formatter
#KT-34744
2020-01-17 21:02:54 +07:00
Toshiaki Kameyama 6b2e58cc0b Inline function: fix it works correctly for callable reference receiver
#KT-26248 Fixed
2020-01-13 11:59:42 +03:00
Igor Yakovlev e2bb602271 Fix invalid test data file names 2020-01-11 00:03:48 +03:00
Igor Yakovlev 0c4134470d Fix exception of rename readonly overridden methods 2020-01-10 21:37:12 +03:00
Dmitry Gridin bfd539d5d1 Formatter: fix line break between declarations with comment
#KT-12490 Fixed
#KT-35088 Fixed
2019-11-26 19:40:51 +07:00
Nikolay Krasko e49d7c86ff Re-mute move refactoring tests (KT-34106) 2019-11-22 22:12:38 +03:00
Igor Yakovlev aba5ff0c1e Fix copy refactoring for multiply kotlin files
Fixed #KT-34971
2019-11-21 19:19:15 +03:00
Alexander Podkhalyuzin ddd25c703a SmartPointers in Introduce Variable refactoring
It's often case, when psi can die after reparse, especially after
reformatting cases, SmartPointers are opposite to it, can survive

#KT-32601 Fixed
2019-10-30 18:08:14 +03:00
Igor Yakovlev 2dfe3c568d Copy refactoring update kotlin packages on target files
Fix #KT-18191
2019-10-23 16:44:18 +03:00