Skip to content

Commit c52b083

Browse files
francescoo22Space Team
authored andcommitted
[PL] Check visibility of declarations in stdlib
Previously, the PL engine skipped visibility checks for declarations in the stdlib for optimization reasons. This led to bugs like KT-81995 where the linker didn't complain when Compose plugin generated a private constructor call in a separate module. ^KT-82213 Fixed
1 parent 06fe771 commit c52b083

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/partial/PartiallyLinkedIrTreePatcher.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,8 @@ internal class PartiallyLinkedIrTreePatcher(
730730
// OK. Used in the same module.
731731
null
732732
}
733-
containingModule.shouldBeSkipped -> {
734-
// Optimization: Don't check visibility of declarations in stdlib & co.
733+
containingModule == PLModule.SyntheticBuiltInFunctions -> {
734+
// Optimization: Don't check the visibility of synthetic built-in functions.
735735
null
736736
}
737737
!declaration.isEffectivelyPrivate() -> {

0 commit comments

Comments
 (0)