Apply is-open constraints to nested types

Closes #3459
This commit is contained in:
Ayaz Hafiz 2022-07-21 15:57:41 -04:00
parent 1d4e6acd41
commit d4cf9b8f8d
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 37 additions and 14 deletions

View file

@ -7421,10 +7421,23 @@ mod solve_expr {
A _ C -> ""
"#
),
@r#"""
x : [A [B]* [C]*]
"""#
@r#"x : [A [B]* [C]*]"#
allow_errors: true
);
}
#[test]
fn catchall_branch_walk_into_nested_types() {
infer_queries!(
indoc!(
r#"
\x -> when x is
#^
{ a: A { b: B } } -> ""
_ -> ""
"#
),
@r#"x : { a : [A { b : [B]* }*]* }*"#
)
}
}