E0141
A range pattern such as 1..5.
Machine-applicable fix: none.
Example
This program fails with E0141.
fn name(n: Int) -> String {
match n {
1..5 => "small"
_ => "big"
}
}
Fixed
The same program, fixed.
fn name(n: Int) -> String {
match n {
_ => if n < 5 { "small" } else { "big" }
}
}
Listed in the checker notes. oskac explain E0141 prints this entry offline.