I have this enum
public enum ActionStatus
{
WINDUP, ACTIVE, COOLDOWN, DONE
}
and this property
public int TicksUntilNextStatus => Status switch
{
ActionStatus.WINDUP => WindupEnd - CurrentTime,
ActionStatus.ACTIVE => ActiveEnd - CurrentTime,
ActionStatus.COOLDOWN => CooldownEnd - CurrentTime,
ActionStatus.DONE => 0
};
Status
is declared as public ActionStatus Status { get => ... }
the compiler issues a warning that the switch is not exhaustive. Why?