Skip to content

v2 tokenize: bind EmptyPattern on 01_tokenize's import chain (N7 resolve link) - #13501

Closed
gunbai-bot[bot] wants to merge 2 commits into
mainfrom
n7/tokenize-emptypattern-import
Closed

gunbai-bot[bot] wants to merge 2 commits into
mainfrom
n7/tokenize-emptypattern-import

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

N7 link: EmptyPattern unbound. lex_match_pattern in v2.compiler.tokenize matches the nullary LexPattern arm EmptyPattern, but the module never imported it. The record-shaped arms (LiteralPattern { … } and the rest) are judged against the scrutinee type. A bare nullary name in pattern position, though, has to be bound by scope, or it would read as a binder. Since the corpus-wide spelling search was deleted from resolve, nothing binds it, and the native resolver refuses with resolve_reason_unbound_symbol (advisory: resolve_unbound_name_is_declared_in_several_modules). v2.std.compilers.target_model already imports it from v2.std.compilers.lexing. This adds the same import to 01_tokenize.

§6b: the earliest unjustified link is the import list of the consuming module. The resolver's refusal is correct and stays as it is.

Target //v2/test/parse/expression_bodied_fn_decl_parse:all

  • base main ea9a51c: BuildBuddy 38db1680-9612-4df4-8eff-0e7a6c512d59. EmptyPattern unbound appears in every member's cause chain (16 occurrences).
  • head 36e9c6d: BuildBuddy 1a68a746-6138-4649-808e-53d485d49708. EmptyPattern is gone from every chain (0 occurrences).

Blocker EmptyPattern cleared. Next blocker: count unbound (#13307), unchanged at the head of the chain. The fatal cause is still projection_receiver_declaration_unavailable until the rest of the chain clears.

🤖 Generated with Claude Code

gunbc-ci-auto-heal and others added 2 commits October 6, 2026 18:55
…olve link)

The nullary arm of lex_match_pattern resolved only through the deleted
corpus-wide spelling search; the native resolver refuses it as unbound
(advisory: declared in several modules). Bind it on the module's chain
like target_model does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Oct 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 7, 2026
@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Oct 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 8, 2026
@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Oct 8, 2026
@gunbai-bot
gunbai-bot Bot removed this pull request from the merge queue due to a manual request Oct 9, 2026
@gunbai-bot

gunbai-bot Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #13641 (v1 closeout): this head is an ancestor of integration/v1-closeout.

@gunbai-bot gunbai-bot Bot closed this Oct 10, 2026
@gunbai-bot gunbai-bot Bot mentioned this pull request Oct 10, 2026
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.

0 participants