Skip to main content
SIFR-MATCH-0002 belongs to the Pattern matching diagnostic family. It means: match guard must be bool.

Why It Happens

The pattern match cannot be proven valid. Check exhaustiveness, guard types, class-pattern fields, and supported pattern forms.
Use sifr --explain SIFR-MATCH-0002 locally to see the renderer’s exact message template and any machine-applicable suggestions for the compiler version you are running.

Erroneous Code

How To Fix It

Make patterns supported, guards boolean, field names valid, and matches exhaustive where required.

Fixed Code

Details

See the Error Codes index for the complete catalog.