Skip to content

refactor(analyser): delete the runtime checks Any values no longer need 🧹 - #356

Merged
timfennis merged 1 commit into
feat/type-checkerfrom
housekeeping/delete-runtime-any-checks
Nov 14, 2026
Merged

timfennis merged 1 commit into
feat/type-checkerfrom
housekeeping/delete-runtime-any-checks

Conversation

@timfennis

Copy link
Copy Markdown
Owner

Since #353 an Any value only leaves Any through a cast, so the checks the analyser added where an Any was passed or stored never fire in a program that analyses without errors. Part of #331.

  • Delete the ExpectType opcode, the type_checks tables, the analyser code that recorded them (expect, expected_of_any, the instance checks), and the argument nodes calls carried only for them.
  • An early pick is always a direct call now, and the rule that turns a runtime pick among one overload into a direct call lives in one helper.
  • Delete branches that only Any reached: the Dynamic arm of choose_function_value, the Any relaxation for function types in StaticType::matches, and the string branches of the generic prefixes/suffixes.

The VM still picks overloads by looking inside containers, for a generic function's own body when it's used as a value (#355).

🤖 Generated with Claude Code

…ed 🧹

With explicit Any, a value of type Any only goes where Any is taken, so
the implicit checks the analyser recorded for Any values never fire for a
program without errors. Delete the ExpectType opcode, the type_checks
tables, the checks the analyser and instances collected for them, the
argument nodes calls carried to place them, the string branches of the
generic prefixes and suffixes, and the Any relaxations for function
values in overload picking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T09:27:05.534897Z 97b369c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@timfennis
timfennis merged commit caefc60 into feat/type-checker Nov 14, 2026
1 check passed
@timfennis
timfennis deleted the housekeeping/delete-runtime-any-checks branch November 14, 2026 09:45
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.

1 participant