From fdbeb15b4ad38cbdc86d23733903a0d1b6062d38 Mon Sep 17 00:00:00 2001 From: Andrey Cherkasov Date: Thu, 5 Feb 2026 22:09:58 +0400 Subject: [PATCH] [kotlin] KTIJ-37402 [EXPLICIT_FIELD_VISIBILITY_MUST_BE_LESS_PERMISSIVE] Provide quick fixes to widen visibility GitOrigin-RevId: 2ffad8b688c03671a88810e1416f4078d73a5a69 --- .../fixes/ChangeVisibilityFixFactories.kt | 11 +++++++++++ .../fixes/KotlinK2QuickFixRegistrar.kt | 1 + .../fixes/HighLevelQuickFixTestGenerated.java | 15 +++++++++++++++ .../ChangeVisibilityModifierIntention.kt | 9 +++++++++ .../tests/K2IntentionTestGenerated.java | 15 +++++++++++++++ .../idea/intentions/K1IntentionTestGenerated.java | 15 +++++++++++++++ .../idea/quickfix/K1QuickFixTestGenerated.java | 15 +++++++++++++++ ...explicitFieldVisibilityMustBeLessPermissive.kt | 10 ++++++++++ ...explicitFieldVisibilityMustBeLessPermissive.kt | 10 ++++++++++ ...explicitFieldVisibilityMustBeLessPermissive.kt | 10 ++++++++++ .../explicitBackingFieldToInternal.kt | 10 ++++++++++ .../explicitBackingFieldToInternal.kt.after | 10 ++++++++++ .../explicitBackingFieldToProtected.kt | 10 ++++++++++ .../explicitBackingFieldToProtected.kt.after | 10 ++++++++++ .../explicitBackingFieldToPublic.kt | 10 ++++++++++ .../explicitBackingFieldToPublic.kt.after | 10 ++++++++++ 16 files changed, 171 insertions(+) create mode 100644 plugins/kotlin/idea/tests/testData/intentions/changeVisibility/internal/explicitFieldVisibilityMustBeLessPermissive.kt create mode 100644 plugins/kotlin/idea/tests/testData/intentions/changeVisibility/protected/explicitFieldVisibilityMustBeLessPermissive.kt create mode 100644 plugins/kotlin/idea/tests/testData/intentions/changeVisibility/public/explicitFieldVisibilityMustBeLessPermissive.kt create mode 100644 plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToInternal.kt create mode 100644 plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToInternal.kt.after create mode 100644 plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToProtected.kt create mode 100644 plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToProtected.kt.after create mode 100644 plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToPublic.kt create mode 100644 plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToPublic.kt.after diff --git a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/ChangeVisibilityFixFactories.kt b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/ChangeVisibilityFixFactories.kt index 9001787016a4..2561c36dd7ee 100644 --- a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/ChangeVisibilityFixFactories.kt +++ b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/ChangeVisibilityFixFactories.kt @@ -212,6 +212,17 @@ internal object ChangeVisibilityFixFactories { ) } + val explicitFieldVisibilityMustBeLessPermissive = + KotlinQuickFixFactory.ModCommandBased { diagnostic: KaFirDiagnostic.ExplicitFieldVisibilityMustBeLessPermissive -> + val property = diagnostic.psi + val propertySymbol = property.symbol + listOfNotNull( + createFixToTargetVisibility(propertySymbol, property, Visibilities.Protected), + createFixToTargetVisibility(propertySymbol, property, Visibilities.Internal), + createFixToTargetVisibility(propertySymbol, property, Visibilities.Public), + ) + } + private fun createFixForNoExplicitVisibilityInApiMode( element: KtDeclaration, ): List { diff --git a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt index 0e046fcabb83..f8627fa39497 100644 --- a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt +++ b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt @@ -578,6 +578,7 @@ class KotlinK2QuickFixRegistrar : KotlinQuickFixRegistrar() { registerFactory(ChangeVisibilityFixFactories.superCallFromPublicInline) registerFactory(ChangeVisibilityFixFactories.protectedCallFromPublicInlineError) registerFactory(ChangeVisibilityFixFactories.nonPublicCallFromPublicInline) + registerFactory(ChangeVisibilityFixFactories.explicitFieldVisibilityMustBeLessPermissive) } private val other = KtQuickFixesListBuilder.registerPsiQuickFix { diff --git a/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixTestGenerated.java b/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixTestGenerated.java index fd7e499084ac..27a8dadbb90f 100644 --- a/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixTestGenerated.java +++ b/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixTestGenerated.java @@ -8908,6 +8908,21 @@ public abstract class HighLevelQuickFixTestGenerated extends AbstractHighLevelQu KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } + @TestMetadata("explicitBackingFieldToInternal.kt") + public void testExplicitBackingFieldToInternal() throws Exception { + runTest("../../../idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToInternal.kt"); + } + + @TestMetadata("explicitBackingFieldToProtected.kt") + public void testExplicitBackingFieldToProtected() throws Exception { + runTest("../../../idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToProtected.kt"); + } + + @TestMetadata("explicitBackingFieldToPublic.kt") + public void testExplicitBackingFieldToPublic() throws Exception { + runTest("../../../idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToPublic.kt"); + } + @TestMetadata("exposedParameterType.kt") public void testExposedParameterType() throws Exception { runTest("../../../idea/tests/testData/quickfix/increaseVisibility/exposedParameterType.kt"); diff --git a/plugins/kotlin/code-insight/intentions-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/intentions/ChangeVisibilityModifierIntention.kt b/plugins/kotlin/code-insight/intentions-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/intentions/ChangeVisibilityModifierIntention.kt index 50e51518458b..e4f19f83f966 100644 --- a/plugins/kotlin/code-insight/intentions-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/intentions/ChangeVisibilityModifierIntention.kt +++ b/plugins/kotlin/code-insight/intentions-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/intentions/ChangeVisibilityModifierIntention.kt @@ -12,6 +12,8 @@ import com.intellij.openapi.util.TextRange import com.intellij.psi.util.PsiTreeUtil import org.jetbrains.kotlin.analysis.api.KaExperimentalApi import org.jetbrains.kotlin.analysis.api.KaSession +import org.jetbrains.kotlin.analysis.api.components.KaDiagnosticCheckerFilter +import org.jetbrains.kotlin.analysis.api.fir.diagnostics.KaFirDiagnostic import org.jetbrains.kotlin.analysis.api.symbols.KaCallableSymbol import org.jetbrains.kotlin.descriptors.Visibilities import org.jetbrains.kotlin.idea.base.codeInsight.handlers.fixers.range @@ -130,6 +132,13 @@ sealed class ChangeVisibilityModifierIntention( @OptIn(KaExperimentalApi::class) override fun KaSession.prepareContext(element: KtDeclaration): Unit? { + // Skip the visibility-change intention when there is an [EXPLICIT_FIELD_VISIBILITY_MUST_BE_LESS_PERMISSIVE], + // as there are already dedicated quick fixes for that compiler error. + if (element.diagnostics(KaDiagnosticCheckerFilter.ONLY_COMMON_CHECKERS) + .any { it is KaFirDiagnostic.ExplicitFieldVisibilityMustBeLessPermissive } + ) { + return null + } val symbol = element.symbol @OptIn(KaExperimentalApi::class) diff --git a/plugins/kotlin/code-insight/intentions-k2/tests/test/org/jetbrains/kotlin/idea/k2/intentions/tests/K2IntentionTestGenerated.java b/plugins/kotlin/code-insight/intentions-k2/tests/test/org/jetbrains/kotlin/idea/k2/intentions/tests/K2IntentionTestGenerated.java index 8ac01d37b6db..d604946db281 100644 --- a/plugins/kotlin/code-insight/intentions-k2/tests/test/org/jetbrains/kotlin/idea/k2/intentions/tests/K2IntentionTestGenerated.java +++ b/plugins/kotlin/code-insight/intentions-k2/tests/test/org/jetbrains/kotlin/idea/k2/intentions/tests/K2IntentionTestGenerated.java @@ -7381,6 +7381,11 @@ public abstract class K2IntentionTestGenerated extends AbstractK2IntentionTest { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } + @TestMetadata("explicitFieldVisibilityMustBeLessPermissive.kt") + public void testExplicitFieldVisibilityMustBeLessPermissive() throws Exception { + runTest("../../../idea/tests/testData/intentions/changeVisibility/internal/explicitFieldVisibilityMustBeLessPermissive.kt"); + } + @TestMetadata("hasJvmFieldInInterfaceCompanion.kt") public void testHasJvmFieldInInterfaceCompanion() throws Exception { runTest("../../../idea/tests/testData/intentions/changeVisibility/internal/hasJvmFieldInInterfaceCompanion.kt"); @@ -7704,6 +7709,11 @@ public abstract class K2IntentionTestGenerated extends AbstractK2IntentionTest { runTest("../../../idea/tests/testData/intentions/changeVisibility/protected/constructorParameter.kt"); } + @TestMetadata("explicitFieldVisibilityMustBeLessPermissive.kt") + public void testExplicitFieldVisibilityMustBeLessPermissive() throws Exception { + runTest("../../../idea/tests/testData/intentions/changeVisibility/protected/explicitFieldVisibilityMustBeLessPermissive.kt"); + } + @TestMetadata("noModifier.kt") public void testNoModifier() throws Exception { runTest("../../../idea/tests/testData/intentions/changeVisibility/protected/noModifier.kt"); @@ -7808,6 +7818,11 @@ public abstract class K2IntentionTestGenerated extends AbstractK2IntentionTest { runTest("../../../idea/tests/testData/intentions/changeVisibility/public/destructuringPropertyException.kt"); } + @TestMetadata("explicitFieldVisibilityMustBeLessPermissive.kt") + public void testExplicitFieldVisibilityMustBeLessPermissive() throws Exception { + runTest("../../../idea/tests/testData/intentions/changeVisibility/public/explicitFieldVisibilityMustBeLessPermissive.kt"); + } + @TestMetadata("notForSealedPrimaryConstructor.kt") public void testNotForSealedPrimaryConstructor() throws Exception { runTest("../../../idea/tests/testData/intentions/changeVisibility/public/notForSealedPrimaryConstructor.kt"); diff --git a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/intentions/K1IntentionTestGenerated.java b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/intentions/K1IntentionTestGenerated.java index 38294bffb598..20c5c995993a 100644 --- a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/intentions/K1IntentionTestGenerated.java +++ b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/intentions/K1IntentionTestGenerated.java @@ -3571,6 +3571,11 @@ public abstract class K1IntentionTestGenerated extends AbstractK1IntentionTest { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } + @TestMetadata("explicitFieldVisibilityMustBeLessPermissive.kt") + public void testExplicitFieldVisibilityMustBeLessPermissive() throws Exception { + runTest("testData/intentions/changeVisibility/internal/explicitFieldVisibilityMustBeLessPermissive.kt"); + } + @TestMetadata("hasJvmFieldInInterfaceCompanion.kt") public void testHasJvmFieldInInterfaceCompanion() throws Exception { runTest("testData/intentions/changeVisibility/internal/hasJvmFieldInInterfaceCompanion.kt"); @@ -3894,6 +3899,11 @@ public abstract class K1IntentionTestGenerated extends AbstractK1IntentionTest { runTest("testData/intentions/changeVisibility/protected/constructorParameter.kt"); } + @TestMetadata("explicitFieldVisibilityMustBeLessPermissive.kt") + public void testExplicitFieldVisibilityMustBeLessPermissive() throws Exception { + runTest("testData/intentions/changeVisibility/protected/explicitFieldVisibilityMustBeLessPermissive.kt"); + } + @TestMetadata("noModifier.kt") public void testNoModifier() throws Exception { runTest("testData/intentions/changeVisibility/protected/noModifier.kt"); @@ -3998,6 +4008,11 @@ public abstract class K1IntentionTestGenerated extends AbstractK1IntentionTest { runTest("testData/intentions/changeVisibility/public/destructuringPropertyException.kt"); } + @TestMetadata("explicitFieldVisibilityMustBeLessPermissive.kt") + public void testExplicitFieldVisibilityMustBeLessPermissive() throws Exception { + runTest("testData/intentions/changeVisibility/public/explicitFieldVisibilityMustBeLessPermissive.kt"); + } + @TestMetadata("notForSealedPrimaryConstructor.kt") public void testNotForSealedPrimaryConstructor() throws Exception { runTest("testData/intentions/changeVisibility/public/notForSealedPrimaryConstructor.kt"); diff --git a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/quickfix/K1QuickFixTestGenerated.java b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/quickfix/K1QuickFixTestGenerated.java index 22922a52b874..73a07821258e 100644 --- a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/quickfix/K1QuickFixTestGenerated.java +++ b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/quickfix/K1QuickFixTestGenerated.java @@ -10664,6 +10664,21 @@ public abstract class K1QuickFixTestGenerated extends AbstractK1QuickFixTest { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } + @TestMetadata("explicitBackingFieldToInternal.kt") + public void testExplicitBackingFieldToInternal() throws Exception { + runTest("testData/quickfix/increaseVisibility/explicitBackingFieldToInternal.kt"); + } + + @TestMetadata("explicitBackingFieldToProtected.kt") + public void testExplicitBackingFieldToProtected() throws Exception { + runTest("testData/quickfix/increaseVisibility/explicitBackingFieldToProtected.kt"); + } + + @TestMetadata("explicitBackingFieldToPublic.kt") + public void testExplicitBackingFieldToPublic() throws Exception { + runTest("testData/quickfix/increaseVisibility/explicitBackingFieldToPublic.kt"); + } + @TestMetadata("exposedParameterType.kt") public void testExposedParameterType() throws Exception { runTest("testData/quickfix/increaseVisibility/exposedParameterType.kt"); diff --git a/plugins/kotlin/idea/tests/testData/intentions/changeVisibility/internal/explicitFieldVisibilityMustBeLessPermissive.kt b/plugins/kotlin/idea/tests/testData/intentions/changeVisibility/internal/explicitFieldVisibilityMustBeLessPermissive.kt new file mode 100644 index 000000000000..223624a28733 --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/intentions/changeVisibility/internal/explicitFieldVisibilityMustBeLessPermissive.kt @@ -0,0 +1,10 @@ +// IS_APPLICABLE: false +// COMPILER_ARGUMENTS: -Xexplicit-backing-fields +// K2_ERROR: Private properties cannot have explicit backing fields. + +class A { + private val prop: List + field = mutableListOf() +} + +// IGNORE_K1 \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/intentions/changeVisibility/protected/explicitFieldVisibilityMustBeLessPermissive.kt b/plugins/kotlin/idea/tests/testData/intentions/changeVisibility/protected/explicitFieldVisibilityMustBeLessPermissive.kt new file mode 100644 index 000000000000..2a02c7c3f1e2 --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/intentions/changeVisibility/protected/explicitFieldVisibilityMustBeLessPermissive.kt @@ -0,0 +1,10 @@ +// IS_APPLICABLE: false +// COMPILER_ARGUMENTS: -Xexplicit-backing-fields +// K2_ERROR: Private properties cannot have explicit backing fields. + +class A { + private val prop: List + field = mutableListOf() +} + +// IGNORE_K1 \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/intentions/changeVisibility/public/explicitFieldVisibilityMustBeLessPermissive.kt b/plugins/kotlin/idea/tests/testData/intentions/changeVisibility/public/explicitFieldVisibilityMustBeLessPermissive.kt new file mode 100644 index 000000000000..2a02c7c3f1e2 --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/intentions/changeVisibility/public/explicitFieldVisibilityMustBeLessPermissive.kt @@ -0,0 +1,10 @@ +// IS_APPLICABLE: false +// COMPILER_ARGUMENTS: -Xexplicit-backing-fields +// K2_ERROR: Private properties cannot have explicit backing fields. + +class A { + private val prop: List + field = mutableListOf() +} + +// IGNORE_K1 \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToInternal.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToInternal.kt new file mode 100644 index 000000000000..af43fa7bba48 --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToInternal.kt @@ -0,0 +1,10 @@ +// "Make 'prop' internal" "true" +// COMPILER_ARGUMENTS: -Xexplicit-backing-fields + +class Point { + private val prop: List + field = mutableListOf() +} + +// IGNORE_K1 +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.ChangeVisibilityFixFactories$ChangeToInternalModCommandAction \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToInternal.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToInternal.kt.after new file mode 100644 index 000000000000..2099ac467124 --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToInternal.kt.after @@ -0,0 +1,10 @@ +// "Make 'prop' internal" "true" +// COMPILER_ARGUMENTS: -Xexplicit-backing-fields + +class Point { + internal val prop: List + field = mutableListOf() +} + +// IGNORE_K1 +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.ChangeVisibilityFixFactories$ChangeToInternalModCommandAction \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToProtected.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToProtected.kt new file mode 100644 index 000000000000..d3bad44c0828 --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToProtected.kt @@ -0,0 +1,10 @@ +// "Make 'prop' protected" "true" +// COMPILER_ARGUMENTS: -Xexplicit-backing-fields + +open class Point { + private val prop: List + field = mutableListOf() +} + +// IGNORE_K1 +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.ChangeVisibilityFixFactories$ChangeToProtectedModCommandAction \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToProtected.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToProtected.kt.after new file mode 100644 index 000000000000..47c53559e052 --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToProtected.kt.after @@ -0,0 +1,10 @@ +// "Make 'prop' protected" "true" +// COMPILER_ARGUMENTS: -Xexplicit-backing-fields + +open class Point { + protected val prop: List + field = mutableListOf() +} + +// IGNORE_K1 +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.ChangeVisibilityFixFactories$ChangeToProtectedModCommandAction \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToPublic.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToPublic.kt new file mode 100644 index 000000000000..6fd0c51acf84 --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToPublic.kt @@ -0,0 +1,10 @@ +// "Make 'prop' public" "true" +// COMPILER_ARGUMENTS: -Xexplicit-backing-fields + +class Point { + private val prop: List + field = mutableListOf() +} + +// IGNORE_K1 +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.ChangeVisibilityFixFactories$ChangeToPublicModCommandAction \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToPublic.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToPublic.kt.after new file mode 100644 index 000000000000..248857e4807b --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/explicitBackingFieldToPublic.kt.after @@ -0,0 +1,10 @@ +// "Make 'prop' public" "true" +// COMPILER_ARGUMENTS: -Xexplicit-backing-fields + +class Point { + val prop: List + field = mutableListOf() +} + +// IGNORE_K1 +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.ChangeVisibilityFixFactories$ChangeToPublicModCommandAction \ No newline at end of file