navid/haze / ea08ceb46539df9cf3ac396bc0bd66fc4f6b9adc630e1596e79b8e4d3101673a / samples/baseline_2.7/is_wrong_pattern_error.hz
is_wrong_pattern_error.hz
← samples/baseline_2.7 · 172 bytes · raw · download
// The is-pattern must match the scrutinee type.
fn maybe() Option[i32] => Some(1)
fn main() {
const value = maybe()
if value is OK(v) {
print(v)
}
}