A quantifier with captures inside it needs a struct/row capture. check enforces this for sequences but not for enum (labeled alternation) branches.
Repro
# enum branch with an internal capture, no row capture — accepted (wrong):
cargo run -p plotnik -- check -l javascript -q 'Q = [A: (identifier) @id]*'
# [] (no error)
# same shape written as a sequence — correctly rejected:
cargo run -p plotnik -- check -l javascript -q 'Q = {(identifier) @id}*'
# error: quantifier `*` contains captures (`@id`) but has no struct capture
Expected
[A: (identifier) @id]* should raise the same strict_dimensionality_violation error, since @id is a capture inside the quantified body.
A quantifier with captures inside it needs a struct/row capture.
checkenforces this for sequences but not for enum (labeled alternation) branches.Repro
Expected
[A: (identifier) @id]*should raise the samestrict_dimensionality_violationerror, since@idis a capture inside the quantified body.