question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build error : FakeNewsViewModel.kt: (46, 13): @exhaustive when is not exhaustive

See original GitHub issue

Overview (Required)

  • Build error : FakeNewsViewModel.kt: (46, 13): @Exhaustive when is not exhaustive

Steps To Reproduce

  1. Check out repository which version is 393f8ab57b8fdedee1c7c3393f50a61eb75bc543 2021/02/28 10:33:52
  2. Build
  3. Build will be failed. The messeage is bellow.
conference-app-2021\compose-uicomponent\src\main\java\io\github\droidkaigi\confsched2021\news\ui\news\FakeNewsViewModel.kt: (46, 13): @Exhaustive when is not exhaustive!

Expected behavior

  • Build success.
  • When I added following place holder, Build was succeded.
                is NewsViewModel.Event.OnHideSnackbarMessage -> {
                }

Screenshots

  • N/A

Env:

  • Android Studio Arctic Fox | 2020.3.1 Canary 8
    • Build AI-0203.7148.57.2031.7165533, build on February 24, 2021
    • Runtime version: 11.08+10-b944.6842174 amd64
    • VM: OpenJDK 64-Bit Server VM by N/A

Additional context

  • N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
adakodacommented, Feb 28, 2021

You are right.

I checked out the latest version again (28b8fc89d750b8b8a2e987b02450e52bdc37da06 2021/02/28 11:50:06), There is nothing problem.

Probably this issue was cause by my mistakes…

0reactions
takahiromcommented, Feb 28, 2021

Thank you for tryng!!🙌

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support sealed (exhaustive) whens : KT-12380
Sealed whens can never have else branch and must be exhaustive (otherwise compiler error is reported in both cases). In bytecode, exception is...
Read more >
How to fix "Non exhaustive 'when' statements on sealed class ...
But I get a warning (in Kotlin 1.7 I guess it will be an error), saying: Non exhaustive 'when' statements on sealed class/interface...
Read more >
TIL: when is “when” exhaustive? - ProAndroidDev
“when” block being assigned to a value as an expression, with error telling us to add the remaining branches or an “else” branch....
Read more >
Exhaustiveness of When Statements | Java to Kotlin
In Kotlin 1.7 onwards a non-exhaustive when statement will be a compile-time error, and we will not need the exhaustive extension any more....
Read more >
if/then/else vs. non-exhaustive when: what is the right approach?
The main idea behind exhaustive whens is that you will get a compiler error at the use site when new enum values are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found