Hacker GitHub

← All repos

shuebner/ClosedTypeHierarchyDiagnosticSuppressor

View on GitHub ↗ ★ 55 C#

Suppresses exhaustiveness warnings for switching (switch statement or expression) on closed type hierarchies

3 mentions on Hacker News by 3 people: 1 story, 2 comments · first 2023-01-07 · latest 2024-08-07

Mentions per year 3 mentions · busiest year 2024 (2)
20082026
  1. I'm currently using nested records with a private constructor in combination with the nuget package https://github.com/shuebner/ClosedTypeHierarchyDiagnosticSup... to make sure the switch types do not require a `_` case. This is…
  2. It's not the best solution, but an analyzer like [0] covers most of the cases for reference types. For enums and struct DUs in general we'll have to wait for language (or even runtime) support. [0] https://github.com/shuebner/ClosedTypeHier…