mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-02 19:32:17 +00:00
implement mono / lowering for tuples
This commit is contained in:
parent
65f8bb3d0d
commit
5a6be05ead
42 changed files with 1773 additions and 290 deletions
|
@ -1497,6 +1497,20 @@ mod solve_expr {
|
|||
infer_eq(".200", "( ... 200 omitted, a )* -> a");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn tuple_accessor_generalization() {
|
||||
infer_eq(
|
||||
indoc!(
|
||||
r#"
|
||||
get0 = .0
|
||||
|
||||
{ a: get0 (1, 2), b: get0 ("a", "b", "c") }
|
||||
"#
|
||||
),
|
||||
"{ a : Num *, b : Str }",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn record_arg() {
|
||||
infer_eq("\\rec -> rec.x", "{ x : a }* -> a");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue