Explore Library
FlashcardIntermediate

Exhaustiveness Checking with never

Assigning to a never variable in the default branch catches unhandled union cases.

Question

How does 'never' enable exhaustiveness checking?

Click to reveal answer