Fix enum switch for Kotlin 1.7.10#457
Conversation
|
The code change itself looks good. |
|
Apparently something you fix in the develop branch already : Do you have any ETA for a new release or maybe push the fix on release ? |
|
Unfortunately, I cannot give an ETA for the new release. Personally, I'm most likely not able to put enough work into this project to push the (pre-)release within two / three weeks. Early December I could have more time, no promises tho. |
|
Closing this since apparently it's fixed Also this is submitted to the wrong branch. Please submit PR to |
Describe the bug
Actual code
when (rfcRecurrenceRule.freq) {
Freq.WEEKLY, Freq.MONTHLY, Freq.YEARLY -> {
recurrenceRule.daysOfWeek = rfcRecurrenceRule.byDayPart?.mapNotNull {
DayOfWeek.values().find { dayOfWeek -> dayOfWeek.ordinal == it.weekday.ordinal }
}?.toMutableList()
}
}
Proposed correction code
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 -> null
}
Let me know if you need more information.
Regards