Skip to content

Commit

Permalink
fix modifier typo
Browse files Browse the repository at this point in the history
  • Loading branch information
j-roskopf committed Apr 15, 2024
1 parent ceaf811 commit eac3b24
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ internal class CodeWriter constructor(

// public always being an implicit modifier in addition to whatever we inherited.
// we don't want to throw away the implicit modifier we inherited
val implicitModifierContainsAtLeastTwoAccessMonitors = implicitModifiers.count {
val implicitModifierContainsAtLeastTwoAccessModifiers = implicitModifiers.count {
it == KModifier.PUBLIC || it == KModifier.PRIVATE || it == KModifier.INTERNAL || it == KModifier.PROTECTED
} >= 2

val uniqueNonPublicExplicitOnlyModifiers =
modifiers
.filterNot { it == KModifier.PUBLIC }
.filterNot { implicitModifiers.contains(it) && implicitModifierContainsAtLeastTwoAccessMonitors.not() }
.filterNot { implicitModifiers.contains(it) && implicitModifierContainsAtLeastTwoAccessModifiers.not() }
.toEnumSet()

for (modifier in uniqueNonPublicExplicitOnlyModifiers) {
Expand Down

0 comments on commit eac3b24

Please sign in to comment.