Add "Remove 'const'" quickfix for TYPE_CANT_BE_USED_FOR_CONST_VAL
So #KT-24815 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
c344354395
commit
1e31d24e9b
@@ -145,7 +145,7 @@ class QuickFixRegistrar : QuickFixContributor {
|
||||
REPEATED_MODIFIER.registerFactory(removeModifierFactory)
|
||||
NON_PRIVATE_CONSTRUCTOR_IN_ENUM.registerFactory(removeModifierFactory)
|
||||
NON_PRIVATE_CONSTRUCTOR_IN_SEALED.registerFactory(removeModifierFactory)
|
||||
|
||||
TYPE_CANT_BE_USED_FOR_CONST_VAL.registerFactory(removeModifierFactory)
|
||||
DEPRECATED_BINARY_MOD.registerFactory(removeModifierFactory)
|
||||
DEPRECATED_BINARY_MOD.registerFactory(RenameModToRemFix.Factory)
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Remove 'const' modifier" "true"
|
||||
|
||||
class Foo
|
||||
|
||||
object Test {
|
||||
<caret>const val c = Foo()
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Remove 'const' modifier" "true"
|
||||
|
||||
class Foo
|
||||
|
||||
object Test {
|
||||
val c = Foo()
|
||||
}
|
||||
@@ -7669,6 +7669,11 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
|
||||
runTest("idea/testData/quickfix/modifiers/removeAbstractModifier.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("removeConst.kt")
|
||||
public void testRemoveConst() throws Exception {
|
||||
runTest("idea/testData/quickfix/modifiers/removeConst.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("removeIncompatibleModifier.kt")
|
||||
public void testRemoveIncompatibleModifier() throws Exception {
|
||||
runTest("idea/testData/quickfix/modifiers/removeIncompatibleModifier.kt");
|
||||
|
||||
Reference in New Issue
Block a user