E0140

An or-pattern such as A | B. Write one arm for each.

Machine-applicable fix: none.

Example

This program fails with E0140.

fn name(n: Int) -> String {
    match n {
        1 | 2 => "small"
        _ => "big"
    }
}

Fixed

The same program, fixed.

fn name(n: Int) -> String {
    match n {
        1 => "small"
        2 => "small"
        _ => "big"
    }
}

Listed in the checker notes. oskac explain E0140 prints this entry offline.

All error codes