[all-open] Don't affect private declarations to change their modality to open
This commit is contained in:
@@ -43,7 +43,7 @@ abstract class AbstractAllOpenDeclarationAttributeAltererExtension : Declaration
|
|||||||
currentModality: Modality,
|
currentModality: Modality,
|
||||||
isImplicitModality: Boolean
|
isImplicitModality: Boolean
|
||||||
): Modality? {
|
): Modality? {
|
||||||
if (currentModality != Modality.FINAL) {
|
if (currentModality != Modality.FINAL || modifierListOwner.isPrivate()) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,4 +13,6 @@ private class Test {
|
|||||||
|
|
||||||
internal fun internalMethod() {}
|
internal fun internalMethod() {}
|
||||||
internal val internalProp: String = ""
|
internal val internalProp: String = ""
|
||||||
|
|
||||||
|
private tailrec fun privateTailrecMethod() {}
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,7 @@ public annotation class AllOpen {
|
|||||||
|
|
||||||
@AllOpen
|
@AllOpen
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
class Test {
|
final class Test {
|
||||||
// source: 'privateMembers.kt'
|
// source: 'privateMembers.kt'
|
||||||
private final @org.jetbrains.annotations.NotNull field internalProp: java.lang.String
|
private final @org.jetbrains.annotations.NotNull field internalProp: java.lang.String
|
||||||
private final field privateProp: java.lang.String
|
private final field privateProp: java.lang.String
|
||||||
@@ -17,7 +17,8 @@ class Test {
|
|||||||
protected @org.jetbrains.annotations.NotNull method getProtectedProp(): java.lang.String
|
protected @org.jetbrains.annotations.NotNull method getProtectedProp(): java.lang.String
|
||||||
public @org.jetbrains.annotations.NotNull method getPublicProp(): java.lang.String
|
public @org.jetbrains.annotations.NotNull method getPublicProp(): java.lang.String
|
||||||
public method internalMethod$test_module(): void
|
public method internalMethod$test_module(): void
|
||||||
private method privateMethod(): void
|
private final method privateMethod(): void
|
||||||
|
private final method privateTailrecMethod(): void
|
||||||
protected method protectedMethod(): void
|
protected method protectedMethod(): void
|
||||||
public method publicMethod(): void
|
public method publicMethod(): void
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user