Skip to content

Commit

Permalink
Fix enum entry renaming phase.
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipDolnik committed Apr 15, 2024
1 parent e9d81bf commit 2b77c0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ object EnumEntryRenamingPhase : SirPhase {
}
}

context(ScheduledPhase.Context)
private val KirClass.isSupported: Boolean
get() = this.originalSirClass.isExported && !this.configuration[EnumInterop.LegacyCaseName]

context(ScheduledPhase.Context)
private val KirEnumEntry.isSupported: Boolean
get() = !this.hasUserDefinedName

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ class CreateExposedKirTypesPhase(

private val ClassDescriptor.hasUserDefinedName: Boolean
get() = this.annotations.findAnnotation(KonanFqNames.objCName)
?.let { !it.hasArgumentValue("name") && !it.hasArgumentValue("swiftName") }
?: true
?.let { it.hasArgumentValue("name") || it.hasArgumentValue("swiftName") }
?: false

companion object {

Expand Down

0 comments on commit 2b77c0e

Please sign in to comment.