Commit Graph

1376 Commits

Author SHA1 Message Date
Dmitry Gridin 5827be4182 Tests: fix test for AS 3.6 2020-02-27 15:39:27 +07:00
Anton Bannykh f20ed39b92 Fix a typo in an error message 2020-02-26 18:57:11 +03:00
Vladimir Dolzhenko afd71d3d19 Adjust tests due to "Remove argument" quick fix for TOO_MANY_ARGUMENTS
Relates to #KT-34026
Relates to #KT-34332
2020-02-25 09:23:46 +01:00
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 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 c87bc2123c Add "Change to val" quick fix for MUST_BE_INITIALIZED
#KT-15723 Fixed
2020-02-21 14:09:54 +01: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
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
Ilya Kirillov 0fe5694cb7 Do not render redundant Nullable annotations when generating declarations
#KT-36321 fixed
2020-02-11 13:48:58 +03:00
Vladimir Dolzhenko 44cf0a9f72 Don't insert import if deprecation replacement contains stdlib typealias
Fixed #KT-14781
2020-02-10 14:59:40 +01:00
Dmitry Gridin 6c439ae85a Create TrailingCommaIntention
#KT-34744
2020-02-04 21:34:53 +07:00
Dmitry Gridin c34b417d0c Fix tests after disabling trailing comma
#KT-34744
2020-02-04 21:34:53 +07:00
Ilya Kirillov 9f7af4b58d Fix testdata after ebe3619251 2020-01-30 15:52:54 +03:00
Ilya Gorbunov 39078342ee Remove mod function deprecation tests
#KT-26654
2020-01-23 19:28:23 +03:00
Leonid Startsev 4285c6045a Fix unavailable 'Specify visibility explicitly' quickfix
in explicit API mode due to incorrect cast.
Add tests for applying this quickfix.
#KT-36020 fixed.
2020-01-23 17:05:50 +03:00
Dmitry Gridin d06787886a Fix tests after implementing trailing comma in formatter
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitriy Novozhilov 76b3964e96 Update testdata according to change compiler version to 1.4 2020-01-17 10:33:50 +03:00
Alexander Udalov 9187a85aaf Rename UseExperimental->OptIn, Experimental->RequiresOptIn in quickfix and IDE tests 2020-01-14 21:04:43 +01:00
Roman Golyshev 42deb7db48 KT-34582 Exclude kotlin.coroutines.experimental package from completion and auto-import
- Exclusion happens only when `ReleaseCoroutines` feature is supported
- Add `LANGUAGE_VERSION` to few tests to make sure that previous exclusions still work when `experimental` package is not excluded entirely
- ^KT-34582 Fixed
2019-12-29 15:35:49 +03:00
Nikolay Krasko 74e2c98426 Fix test data for QuickFixTestGenerated.SupertypeInitialization in 191 2019-12-27 16:53:19 +03:00
Toshiaki Kameyama 716036a000 RemoveModifierFix: fix message for 'companion object'
#KT-35604 Fixed
2019-12-27 15:38:32 +03:00
Nikolay Krasko 2f129ea435 Allow resolve during fixing AddSpringBeanQualifierFix action
Fix SpringQuickFixTestGenerated test
2019-12-25 14:05:15 +03:00
Dmitriy Novozhilov eed5b3f1d1 Add quickfix for removing redundant spread operator
#KT-25306 Fixed
2019-12-19 10:22:45 +03:00
Alexander Udalov 16db3a8b5f Fix compiler and IDE tests on Experimental/RequiresOptIn
See cdbabf224f, e009c7064e
2019-12-18 14:09:06 +01:00
Toshiaki Kameyama 8857827dce "Add not-null asserted (!!) call": do not add this when implicit receiver is not extension receiver
#KT-34894 Fixed
2019-12-17 11:15:53 +03:00
Toshiaki Kameyama f1c605d0f7 AddFunctionParametersFix: improve parameter name for 'it' argument
#KT-33297 Fixed
2019-12-17 11:10:15 +03:00
Toshiaki Kameyama 23749bdde7 Add constructor parameter: add generic types correctly
#KT-34203 Fixed
2019-12-17 11:00:51 +03:00
Victor Petukhov 07269661b4 NI: Allow to resolve to functions with SAM conversion and passing array without spread as vararg (with warning)
^KT-35224 Fixed
2019-12-12 23:46:16 +03:00
Toshiaki Kameyama 12f17a6724 "Add constructor parameters" quick fix should add default parameters from super class (#2869)
#KT-33109 Fixed
2019-12-10 13:09:31 +01:00
Nikolay Krasko c12599a045 Fix test data for testParamTypeLambdaMismatch in >= 192 2019-12-02 13:29:36 +03:00
Dmitry Gridin 37371edb8c Auto-import: add quickfix for overloaded generic function
#KT-34667 Fixed
2019-11-29 21:09:24 +07:00
Dmitry Gridin 4b98430058 Formatter: fix line break after package & file annotation
#KT-23957 Fixed
2019-11-29 21:09:04 +07:00
Nikolay Krasko 35fec9e9db Fix withJava test after resorting annotation targets
Was broken after eb71e68.
2019-11-28 12:02:00 +03:00
Nikolay Krasko eb71e686da Stable order of generated annotation targets
A random order of usages is enabled in 193 platform that makes tests flaky without the commit.
2019-11-27 12:26:54 +03:00
Toshiaki Kameyama f6059c3eb5 "Change to var": remove const modifier
#KT-35022 Fixed
2019-11-23 01:17:38 +09:00
victor.petukhov cf161f8234 Rework notForIncompletionCall test 2019-11-17 15:19:28 +03:00
igoriakovlev cb11282183 Merge pull request #2516 from t-kameyama/KT-18539
KT-18539 Default implement fun/property text shouldn't contain scary comment
2019-11-13 19:33:44 +03:00
Pavel Kirpichenkov 9a231bbbfa Update trailing lambda quickfix, add tests
Case of incorrect call expression as the receiver of dot-qualified expression
was not handled properly.

Now the following order is used:
- If parent is a call expression or if this call is a receiver of parent
dot-qualified expression, parent must get last lambda as a new receiver;
- Otherwise, if parent is a dot-qualified expression, this call is in selector position.
Then grandparent is checked for being call or dot-qualified expression. If so, trailing
lambda must become grandparent's new receiver. If not, trailing nodes become standalone
epressions after parent.
- Otherwise, incorrect call expression is a standalone expression, so trailing nodes
may be lifted and put after it.
2019-11-13 11:00:01 +03:00
Pavel Kirpichenkov f1934fa49d Amend "Terminate preceding call with semicolon" quickfix
Quickfix wasn't aware of cases, when expression to be fixed
 is a part of parent call expression or dot-qualified expression.
 Incorrect position for extracting trailing lambdas led to broken
 formatting.

 #KT-34694 Fixed
2019-11-13 11:00:01 +03:00
Toshiaki Kameyama 4d9b19da82 Remove comments from function/property implementation template
#KT-18539 Fixed
2019-11-13 08:37:25 +09:00
victor.petukhov 62d204f4d6 Support trailing comma
^KT-34743 Fixed
2019-11-01 19:40:20 +03:00
Toshiaki Kameyama 68ea677cc4 Import quick fix: support extension iterator function
#KT-34303 Fixed
2019-10-29 18:35:14 +07:00
Dmitry Gridin 5d16753285 ImportFix: add support for WRONG_NUMBER_OF_TYPE_ARGUMENTS
#KT-23834 Fixed
2019-10-29 17:25:17 +07:00
Toshiaki Kameyama 60f4ed914a "Add parameter to function" quick fix: apply for TYPE_MISMATCH error
#KT-8478 Fixed
2019-10-22 21:22:33 +07:00
Toshiaki Kameyama e8effe6727 Replace with safe call: do not add redundant elvis operator
#KT-34432 Fixed
2019-10-21 23:28:19 +07:00
Toshiaki Kameyama 27eea882fb ChangeVisibilityFix: remove redundant property setter
#KT-33796 Fixed
2019-10-21 15:55:04 +07:00
Toshiaki Kameyama 48968c0fe2 Replace deprecated symbol usage: do not include 'Companion' in import directives when importing companion object
#KT-34078 Fixed
2019-10-21 15:55:04 +07:00
Toshiaki Kameyama d72e55d1b7 Add "Make private and overrides member" quick fix for ACCIDENTAL_OVERRIDE
#KT-18536 Fixed
2019-10-17 17:08:03 +07:00
Yan Zhulanow d153aa87a8 Fix EA-126019: Handle 'null' PsiType as nullable Any in "Create" actions 2019-10-08 19:13:56 +09:00