Closed sgowda97 closed 1 year ago
Issue #470
Error
CalendarDelegate.kt:784:9 'when' expression must be exhaustive, add necessary 'DAILY', 'HOURLY', 'MINUTELY', 'SECONDLY' branches or 'else' branch instead
Fix
when (rfcRecurrenceRule.freq) { Freq.WEEKLY, Freq.MONTHLY, Freq.YEARLY -> { recurrenceRule.daysOfWeek = rfcRecurrenceRule.byDayPart?.mapNotNull { DayOfWeek.values().find { dayOfWeek -> dayOfWeek.ordinal == it.weekday.ordinal } }?.toMutableList() } else -> recurrenceRule.daysOfWeek = null }
Added 'else' so that it is compliant with Kotlin 1.7.21.
@thomassth version 4.3.1 should be ready to be approved and merged, I just fixed a failing test, bumped the version and updated the changelog.
Issue #470
Error
CalendarDelegate.kt:784:9 'when' expression must be exhaustive, add necessary 'DAILY', 'HOURLY', 'MINUTELY', 'SECONDLY' branches or 'else' branch instead
Fix
when (rfcRecurrenceRule.freq) { Freq.WEEKLY, Freq.MONTHLY, Freq.YEARLY -> { recurrenceRule.daysOfWeek = rfcRecurrenceRule.byDayPart?.mapNotNull { DayOfWeek.values().find { dayOfWeek -> dayOfWeek.ordinal == it.weekday.ordinal } }?.toMutableList() } else -> recurrenceRule.daysOfWeek = null }
Added 'else' so that it is compliant with Kotlin 1.7.21.