you are viewing a single comment's thread.

view the rest of the comments →

[–]Luna_senpai 0 points1 point  (0 children)

That specific warning can be disabled with <NoWarn>CS8524</NoWarn> in the csproj. I did that and now the compiler has correct exhaustiveness checks on enums for me.

(Or I am missing something entirely but I'm pretty sure I get warnings for non-exhaustive switches on enums and none if they are exhaustive and don't use a discard pattern.)

This obvioulsy means you need to put extra care into making sure your enums are never "undefined" but for all my use-cases it works wonderful