Adds regression tests for polymorphic records in the repl

Closes #2620
This commit is contained in:
Ayaz Hafiz 2022-08-10 15:10:24 -07:00
parent 1f45d13c67
commit 4114e1f14d
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -1192,3 +1192,27 @@ fn opaque_wrap_function() {
"[@A 1, @A 2, @A 3] : List (A U8)", "[@A 1, @A 2, @A 3] : List (A U8)",
); );
} }
#[test]
fn record_of_poly_function() {
expect_success(
indoc!(
r#"
{ a: \_ -> "a" }
"#
),
r#"{ a: <function> } : { a : * -> Str }"#,
);
}
#[test]
fn record_of_poly_function_and_string() {
expect_success(
indoc!(
r#"
{ a: \_ -> "a", b: "b" }
"#
),
r#"{ a: <function>, b: "b" } : { a : * -> Str, b : Str }"#,
);
}