mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Support underscores in assignment patterns
This commit is contained in:
parent
569e90d682
commit
beccc92c87
4 changed files with 16 additions and 25 deletions
|
@ -7438,6 +7438,20 @@ mod solve_expr {
|
|||
"#
|
||||
),
|
||||
@r#"x : { a : [A { b : [B]* }*]* }*"#
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn infer_type_with_underscore_destructure_assignment() {
|
||||
infer_eq_without_problem(
|
||||
indoc!(
|
||||
r#"
|
||||
Pair x _ = Pair 0 1
|
||||
|
||||
x
|
||||
"#
|
||||
),
|
||||
"Num *",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue