Skip to content

Conversation

@zharinov
Copy link
Member

@zharinov zharinov commented Jan 5, 2026

Summary

  • Type annotation :: Name on struct captures ({...} @x :: Name) now names the struct instead of creating a Node alias
  • Same fix applies to enum captures ([A: ... B: ...] @x :: Name)
  • Extracted annotation_to_alias helper to deduplicate annotation→type conversion

Why

Bug: {(fn) @fn} @outer :: FunctionInfo generated type FunctionInfo = Node instead of interface FunctionInfo { fn: Node }.

The annotation was eagerly creating a TypeShape::Custom that always aliased Node, ignoring the struct's actual fields.

@zharinov zharinov merged commit af450ab into master Jan 5, 2026
4 checks passed
@zharinov zharinov deleted the fix/type-annotation-struct-naming branch January 5, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants