Comparing enums without their associated values

Using the is-Syntax may be a another idea:

if test is .bar {
  // ...
}
12 Likes