Check map literals (bare, typed, keyed) #57

Closed
opened 2026-09-10 22:13:54 +00:00 by jacksonopp · 0 comments
Owner

Type-check Expr::MapLiteral -- key_type/value_type when present are the source of truth for every entry, otherwise every key and every value must each agree on one inferred type. Result type is Map(K, V).

Dependency: no TyKind variant exists yet for a generic container instantiation (checked -- only Bool/Enum/Error/Float/Fn/Int/String/Struct/Type/TypeParam/Unit). Deciding how Map(K, V) gets represented as a concrete Ty is tracked separately in #69 (not #6, which only covers T: type params / List(T)-shaped calls as ordinary function calls, not this) -- needs that settled first.

Type-check Expr::MapLiteral -- key_type/value_type when present are the source of truth for every entry, otherwise every key and every value must each agree on one inferred type. Result type is Map(K, V). **Dependency:** no TyKind variant exists yet for a generic container instantiation (checked -- only Bool/Enum/Error/Float/Fn/Int/String/Struct/Type/TypeParam/Unit). Deciding how Map(K, V) gets represented as a concrete Ty is tracked separately in #69 (not #6, which only covers T: type params / List(T)-shaped calls as ordinary function calls, not this) -- needs that settled first.
jacksonopp added this to the twill project 2026-09-10 22:20:25 +00:00
jacksonopp removed this from the twill project 2026-10-04 02:28:22 +00:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jacksonopp/twill#57
No description provided.