You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[FIR] Remove incorrect fast-path from @PublishedAPI computation for binary declarations
Published API effective visibility depends not only on `@PublishedAPI`
annotation on the declaration, but also on this annotation on the parent
declaration, so it's illegal to just skip all not annotated declarations
^KT-74040 Fixed
Copy file name to clipboardExpand all lines: compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/transformers/publishedApiEffectiveVisibility.kt
+3-5
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ fun computePublishedApiEffectiveVisibility(
67
67
)
68
68
}
69
69
70
-
funcomputePublishedApiEffectiveVisibility(
70
+
privatefuncomputePublishedApiEffectiveVisibility(
71
71
hasPublishedApiAnnotation:Boolean,
72
72
visibility:Visibility,
73
73
selfEffectiveVisibility:EffectiveVisibility,
@@ -112,8 +112,6 @@ fun FirMemberDeclaration.setLazyPublishedVisibility(annotations: List<FirAnnotat
112
112
}
113
113
114
114
fun FirMemberDeclaration.setLazyPublishedVisibility(hasPublishedApi:Boolean, parentProperty:FirProperty?, session:FirSession) {
@R|kotlin/PublishedApi|() internal final [HasNoEnumEntriesKey=true, IsNewPlaceForBodyGeneration=false, LazyPublishedApiEffectiveVisibilityKey=public] class Nested : R|kotlin/Any| {
61
-
public [ContainingClassKey=Nested] constructor(): R|test/Public.Nested|
61
+
public [ContainingClassKey=Nested, LazyPublishedApiEffectiveVisibilityKey=public] constructor(): R|test/Public.Nested|
62
62
63
63
}
64
64
@@ -67,8 +67,8 @@ public final [HasNoEnumEntriesKey=true, IsNewPlaceForBodyGeneration=false] class
67
67
@R|kotlin/PublishedApi|() internal final [HasNoEnumEntriesKey=true, IsNewPlaceForBodyGeneration=false, LazyPublishedApiEffectiveVisibilityKey=public] class Published : R|kotlin/Any| {
68
68
@R|kotlin/PublishedApi|() internal final [LazyPublishedApiEffectiveVisibilityKey=public] fun method(): R|kotlin/Unit|
69
69
70
-
public final val foo: R|kotlin/String|
71
-
public [ContainingClassKey=Published] get(): R|kotlin/String|
70
+
public final [LazyPublishedApiEffectiveVisibilityKey=public] val foo: R|kotlin/String|
71
+
public [ContainingClassKey=Published, LazyPublishedApiEffectiveVisibilityKey=public] get(): R|kotlin/String|
72
72
73
73
@PROPERTY:R|kotlin/PublishedApi|() internal final [LazyPublishedApiEffectiveVisibilityKey=public] val prop: R|kotlin/Int|
@R|kotlin/PublishedApi|() internal final [HasNoEnumEntriesKey=true, IsNewPlaceForBodyGeneration=false, LazyPublishedApiEffectiveVisibilityKey=public] class Nested : R|kotlin/Any| {
61
-
public [ContainingClassKey=Nested] constructor(): R|test/Public.Nested|
61
+
public [ContainingClassKey=Nested, LazyPublishedApiEffectiveVisibilityKey=public] constructor(): R|test/Public.Nested|
62
62
63
63
}
64
64
@@ -67,8 +67,8 @@ public final [HasNoEnumEntriesKey=true, IsNewPlaceForBodyGeneration=false] class
67
67
@R|kotlin/PublishedApi|() internal final [HasNoEnumEntriesKey=true, IsNewPlaceForBodyGeneration=false, LazyPublishedApiEffectiveVisibilityKey=public] class Published : R|kotlin/Any| {
68
68
@R|kotlin/PublishedApi|() internal final [LazyPublishedApiEffectiveVisibilityKey=public] fun method(): R|kotlin/Unit|
69
69
70
-
public final val foo: R|kotlin/String|
71
-
public [ContainingClassKey=Published] get(): R|kotlin/String|
70
+
public final [LazyPublishedApiEffectiveVisibilityKey=public] val foo: R|kotlin/String|
71
+
public [ContainingClassKey=Published, LazyPublishedApiEffectiveVisibilityKey=public] get(): R|kotlin/String|
72
72
73
73
@PROPERTY:R|kotlin/PublishedApi|() internal final [LazyPublishedApiEffectiveVisibilityKey=public] val prop: R|kotlin/Int|
0 commit comments