User: kyle wood Date: 17 Aug 22 23:52 Revision: 53a0fd1771158e85867783c44dbb6c5e5b080923 Summary: Workaround bug in IntelliJ error highlighting TeamCity URL: https://ci.denwav.dev/viewModification.html?tab=vcsModificationFiles&modId=8085&personal=false Index: src/main/kotlin/translations/TranslationFiles.kt =================================================================== --- src/main/kotlin/translations/TranslationFiles.kt (revision 58e6b4d7ae5c1c5f87d8482b3fc5e015151913dc) +++ src/main/kotlin/translations/TranslationFiles.kt (revision 53a0fd1771158e85867783c44dbb6c5e5b080923) @@ -192,6 +192,9 @@ is FileEntry.Comment -> result.append("# ${entry.text}\n") is FileEntry.Translation -> result.append("${entry.key}=${entry.text}\n") FileEntry.EmptyLine -> result.append('\n') + // TODO: IntelliJ shows a false error here without the `else`. The compiler doesn't care because + // FileEntry is a sealed class. When this bug in IntelliJ is fixed, remove this `else`. + else -> {} } } @@ -226,6 +229,9 @@ result.append("\"${StringUtil.escapeStringCharacters(entry.text)}\",\n") } FileEntry.EmptyLine -> result.append('\n') + // TODO: IntelliJ shows a false error here without the `else`. The compiler doesn't care because + // FileEntry is a sealed class. When this bug in IntelliJ is fixed, remove this `else`. + else -> {} } }