Fix tuple accessor type printing

This commit is contained in:
Joshua Warner 2023-01-22 13:22:35 -08:00
parent de828416bf
commit 303e5bceb3
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
3 changed files with 30 additions and 3 deletions

View file

@ -1489,6 +1489,14 @@ mod solve_expr {
infer_eq("(5, 3.14 )", "( Num *, Float * )*");
}
#[test]
fn tuple_literal_accessor_ty() {
infer_eq(".0", "( a )* -> a");
infer_eq(".4", "( _, _, _, _, a )* -> a");
infer_eq(".5", "( ... 5 omitted, a )* -> a");
infer_eq(".200", "( ... 200 omitted, a )* -> a");
}
#[test]
fn record_arg() {
infer_eq("\\rec -> rec.x", "{ x : a }* -> a");