parse default optional expressions in pattern matches

This commit is contained in:
Folkert 2020-07-20 00:52:16 +02:00 committed by Richard Feldman
parent 6d40de7430
commit d779e68773
6 changed files with 209 additions and 26 deletions

View file

@ -2629,4 +2629,16 @@ mod solve_expr {
"{ a : { x : Num a, y : Float, z : c }, b : { blah : Str, x : Num a, y : Float, z : c } }",
);
}
#[test]
fn optional_field_function() {
infer_eq_without_problem(
indoc!(
r#"
\{ x, y ? 0 } -> x + y
"#
),
"{ x : Num a, y ? Num a }* -> Num a",
);
}
}