Skip to content

Conversation

@zharinov
Copy link
Member

@zharinov zharinov commented Jan 5, 2026

Summary

  • Fix type inference to produce string[] instead of string for (x)* @names :: string
  • Fix bytecode emission to use Text effect for array elements when :: string annotation present
  • Add has_string_annotation() helper method on CapturedExpr

Why

The :: string annotation on quantified captures (* and +) was broken in two ways:

  1. Type inference replaced the entire array type with string instead of replacing the element type
  2. Bytecode emission always used Node effect for array elements, ignoring the annotation

This caused queries like (identifier)+ @names :: string to produce Node[] at runtime and incorrect TypeScript types.

@zharinov zharinov enabled auto-merge (squash) January 5, 2026 15:22
@zharinov zharinov merged commit 6023588 into master Jan 5, 2026
4 checks passed
@zharinov zharinov deleted the fix/string-annotation-quantifier branch January 5, 2026 15:23
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