Commit Graph

1520 Commits

Author SHA1 Message Date
Roman Golyshev 9cadd1c8a7 Remove IGNORE_FIR from test data of already green test 2021-05-13 03:22:07 +03:00
Roman Golyshev d7a91cb05e Remove IGNORE_FIR directive from already green tests 2021-05-12 16:28:31 +00:00
Roman Golyshev 4adb291a12 Mute failing AutoImportQuickFix tests 2021-05-12 16:28:30 +00:00
Roman Golyshev 22db894076 FIR IDE: Add Add Import quickfix
This quickfix can import unresolved types and callables

It currently does not support Java types and is not as advanced as in
the old plugin

Also, enable tests that now pass
2021-05-12 16:28:28 +00:00
Roman Golyshev 3ad9e4cb5c Use Import instead of action FQN
This way test data can be used both in the old plugin and in the
FIR plugin
2021-05-12 16:28:27 +00:00
Tianyu Geng 302e0fa46b FIR IDE: add quickfix AddWhenElseBranchFix 2021-05-11 21:42:45 +02:00
Andrei Klunnyi b7eded6e48 KT-46146 no 'protected' for final classes
Intention to change final class constructor visibility to 'protected'
was erroneous. This commit removes it.
2021-05-07 12:47:40 +00:00
Andrei Klunnyi 686368749a KT-46146 'protected' is unavailable for primary constructors
Prior to this commit intention to change primary constructor visibility
to 'protected' was filtered out.
2021-05-07 12:47:38 +00:00
Tianyu Geng 06ba143afe FIR IDE: quickfix to make class abstract if member not implemented 2021-05-07 00:40:37 +03:00
Mark Punzalan 73b796f184 FIR IDE: Enable RemoveExclExclCallFix for UNNECESSARY_NON_NULL_ASSERTION. 2021-04-19 22:29:07 +02:00
Ilmir Usmanov 7b14975740 Add 'value' modifier to modifier order
Otherwise, there will be unfixable 'non-canonical modifier order'
warning
 #KT-46088
 #KTIJ-5636 Fixed
2021-04-16 18:51:44 +03:00
Mark Punzalan 957f6ddafd FIR checker: Enable ReplaceWithDotCallFix for UNNECESSARY_SAFE_CALL. 2021-04-14 22:30:42 +02:00
Mikhail Glukhikh 6ee169c01e Rename EffectiveVisibility.Private to PrivateInClass 2021-04-08 09:41:26 +03:00
Abduqodiri Qurbonzoda b0f1ddc91e Advance max/min(By/With) deprecation level to ERROR 2021-04-07 07:49:23 +03:00
Tianyu Geng 4d505f4393 FIR IDE: add intention to add custom accessor to uninitliazed property 2021-04-06 13:19:00 +02:00
Tianyu Geng 6d69959bfd FIR IDE: register quickfix to add lateinit modifier 2021-04-06 13:19:00 +02:00
Tianyu Geng d5ea68c585 FIR IDE: add quick fix to add initializer for MUST_BE_INITIALIZED_OR_BE_ABSTRACT 2021-04-06 13:19:00 +02:00
Tianyu Geng 72f7405e4a FIR IDE: add quickfix to add abstract modifier for MUST_BE_INITIALIZED_OR_BE_ABSTRACT 2021-04-06 13:19:00 +02:00
Ilya Kirillov bd38363077 FIR IDE: use IGNORE_FIR instead of FIR_COMPARISON in hl quick fix tests
To explicitly specify which test are failing
2021-04-01 18:24:17 +02:00
Vyacheslav Gerasimov f2a892a972 Cleanup 201 and as41 bunch files 2021-03-30 14:23:43 +03:00
Mikhail Zarechenskiy 943f03e55f Fix add import quick fix for delegated property and missing extension
^KT-39199 Fixed
2021-03-30 13:58:41 +03:00
Victor Petukhov 5d78b0a962 Report resolution ambiguity on '+=' by taking into account full resolution result including post type checking for '+'
^KT-45503 Fixed
2021-03-30 12:12:56 +03:00
Mark Punzalan dd20dd9806 Report WRONG_MODIFIER_TARGET on the modifier instead of the declaration
in ExternalFunChecker.

This allows RemoveModifierFix to provide a quickfix to remove it.
2021-03-27 22:27:36 +01:00
Mark Punzalan 062adf21de FIR IDE: Use KtFirExpressionTypeProvider.getExpectedType() in
ReplaceCallFix.
2021-03-23 11:04:33 +01:00
Mark Punzalan e9298d1d71 FIR IDE: Allow FIR-specific "after" files for
AbstractHighLevelQuickFixTest.
2021-03-23 11:04:33 +01:00
Mark Punzalan 164d7d80b6 FIR IDE: Enable ReplaceCallFix for UNSAFE_CALL. 2021-03-23 11:04:33 +01:00
Mark Punzalan 1b649fa4cb FIR IDE: Generate quickfix tests related to ReplaceCallFix. 2021-03-23 11:04:33 +01:00
Mark Punzalan c3d2ce0c1f FIR checker/IDE: Add checker and quickfix for WRONG_MODIFIER_TARGET.
There are only simple checks for `external` and `const` for now. The
rest of the checks (see ModifiersChecker in FE1.0) will be added later.
2021-03-17 10:45:26 +01:00
Mark Punzalan bb790195a2 FIR IDE: Enable ChangeVariableMutabilityFix for MUST_BE_INITIALIZED. 2021-03-11 16:31:40 +01:00
Tianyu Geng 8158a07063 FIR IDE: add quickfix for NESTED_CLASS_NOT_ALLOWED 2021-03-05 13:27:36 +01:00
Tianyu Geng bca393bd5c FIR IDE: Add quickfix for PRIVATE_SETTER_FOR_(OPEN|ABSTRACT)_PROPERTY 2021-03-01 19:30:31 +01:00
Ilmir Usmanov 2523ea1ef4 Do not add @JvmInline annotation on JS and Native 2021-02-25 16:07:00 +01:00
Ilmir Usmanov 2df049fc03 Minor. Remove outdated test and update maven test 2021-02-25 16:06:58 +01:00
Ilmir Usmanov 8c31fcb615 Add inline class -> @JvmInline value class intention 2021-02-25 16:06:54 +01:00
Mark Punzalan 1c94372b6c FIR checker/IDE: Add checker and quickfix for VAL_WITH_SETTER. 2021-02-25 13:06:53 +01:00
Tianyu Geng aec498a4ea Add quickfixes for NON_FINAL_MEMBER_IN_FINAL_CLASS 2021-02-24 15:56:35 +01:00
Tianyu Geng 56854a8b1a FIR IDE: register quickfix for the following
1. NON_ABSTRACT_FUNCTION_WITH_NO_BODY
  2. ABSTRACT_PROPERTY_IN_NON_ABSTRACT_CLASS
  3. ABSTRACT_FUNCTION_IN_NON_ABSTRACT_CLASS
2021-02-19 13:16:42 +01:00
Mark Punzalan 706d3e5aa8 FIR IDE: Add quickfix for VAR_ANNOTATION_PARAMETER. 2021-02-15 21:07:32 +01:00
Mark Punzalan 4e44804c77 FIR IDE: Add quickfix for INAPPLICABLE_LATEINIT_MODIFIER.
Also changed FE1.0 checker and all related fix factories to report error
on the declaration instead of the lateinit modifier. This is consistent
with the direction of all checkers in FIR (no reporting on modifiers).
2021-02-15 19:37:14 +01:00
Ilya Kirillov d42cc219bf FIR IDE: fix collecting diagnostics for raanalysable non-toplevel declarations 2021-02-12 15:25:14 +01:00
Dmitriy Novozhilov f3a8fcaea6 [FE] Make constructors of sealed classes protected instead of internal 2021-02-12 13:36:38 +03:00
Mark Punzalan 7962224804 FIR IDE: Add quickfix for VAR_OVERRIDDEN_BY_VAL. 2021-02-11 11:11:00 +01:00
Ilya Kirillov d72a2d39da FIR IDE: ignore not passing quickfixes tests 2021-02-09 17:15:31 +01:00
Dmitriy Novozhilov 17230397e6 [Test] Update or drop some IDE tests about experimental coroutines 2021-01-28 13:19:34 +03:00
Dmitriy Novozhilov a9ef8bb32f [IDE] Update SuperClassNotInitialized to relaxed restrictions on sealed classes 2021-01-28 13:19:28 +03:00
Dmitriy Novozhilov 16e0c0b820 [Test] Update testdata of quickfix tests related to sealed classes 2021-01-28 13:19:28 +03:00
Mikhail Zarechenskiy a33877a9b9 Fix add import quick fix for unresolved conventional invoke operator
After adding extension invoke on DeepRecursiveFunction in 1.4,
 the compiler start reporting another error and now it doesn't write
 info about callable descriptor. Therefore it's needed to use another
 source of info for expression type

 ^KT-40926 Fixed
2021-01-22 13:57:47 +03:00
Andrei Klunnyi eed27906e3 KT-44043 [Sealed interfaces]: tests
So far, quick-fix tests infrastructure neither supports the check
for multiple files (several .before/.after pairs) nor multi module
structure. Provided tests are quite limited yet allow to make sure that
the fix in question appears in expected context and get activated.

^KT-44043 fixed
2021-01-14 10:25:34 +00:00
Andrei Klunnyi 3f287d344e KT-43941 [Sealed interfaces]: subclass intention
Restriction for sealed inheritors was relaxed. Instead of being nested
class members now they can be the members of the same module and
package.
2020-12-28 13:45:58 +00:00
Andrei Klunnyi 2b3fc330ad KTIJ-664 [SealedClassInheritorsProvider]: test fixes 2020-12-16 11:35:27 +01:00