# \#exhaustivity-checkin

**URL:** https://forums.swift.org/tag/exhaustivity-checkin/956.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [Switch exhaustivity checking doesn't understand ranges](https://forums.swift.org/t/switch-exhaustivity-checking-doesnt-understand-ranges/69549)

<div class="topic-metadata">

**Author:** [@wadetregaskis](https://forums.swift.org/u/wadetregaskis)\
**Replies:** 8\
**Last updated:** [January 24, 2024, 4:50pm UTC](https://forums.swift.org/t/switch-exhaustivity-checking-doesnt-understand-ranges/69549 "2024-01-24T16:50:35Z")

</div>

e.g.: func bestMatch(forInputBitDepth bitDepth: Int) -\> Int { switch bitDepth { // ❌ Switch must be exhaustive case ...8: 8 case 9...10: 10 case 11...: 12 } } It's amazing how often …
