Add associative map constraints and range refinement

This commit is contained in:
2026-08-14 06:26:15 +09:00
parent 8198b615a8
commit cc6ab40807
52 changed files with 8951 additions and 6918 deletions
@@ -182,3 +182,31 @@ Array constraints
left: (identifier)
right: (comparison_constraint
value: (integer))))))))
==================
Map constraint and ascription
==================
{
services = {
api = { port = 8080; };
} as {...{ port = Int; }};
}
---
(source_file
(object
(field_definition
path: (field_path (identifier))
value: (as_expression
narrower: (object
(field_definition
path: (field_path (identifier))
value: (object
(field_definition
path: (field_path (identifier))
value: (literal (integer))))))
wider: (map_constraint
value: (object
(field_definition
path: (field_path (identifier))
value: (identifier))))))))