From 617f5a803c24c72e60814500e9d95ec116b16848 Mon Sep 17 00:00:00 2001 From: Joe Roskopf <7951665+j-roskopf@users.noreply.github.com> Date: Mon, 15 Apr 2024 07:36:51 -0500 Subject: [PATCH] fix modifier typo --- .../commonMain/kotlin/com/squareup/kotlinpoet/CodeWriter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kotlinpoet/src/commonMain/kotlin/com/squareup/kotlinpoet/CodeWriter.kt b/kotlinpoet/src/commonMain/kotlin/com/squareup/kotlinpoet/CodeWriter.kt index d9f456d492..28bcc68437 100644 --- a/kotlinpoet/src/commonMain/kotlin/com/squareup/kotlinpoet/CodeWriter.kt +++ b/kotlinpoet/src/commonMain/kotlin/com/squareup/kotlinpoet/CodeWriter.kt @@ -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) {