Skip to content

📝 docs(vm): correct the element types Object::static_type reports - #216

Merged
timfennis merged 1 commit into
masterfrom
housekeeping/static-type-doc-comment
Sep 3, 2026
Merged

📝 docs(vm): correct the element types Object::static_type reports#216
timfennis merged 1 commit into
masterfrom
housekeeping/static-type-doc-comment

Conversation

@timfennis

Copy link
Copy Markdown
Owner

Context

Noticed while rebasing feat/explicit-numeric-modes (#210) onto the as-cast work. That branch dropped a commit which, among other things, had fixed this comment — so the inaccuracy stays on master until someone corrects it on its own.

Change

Object::static_type's doc comment claimed container element types are reported as Any, with Tuple as the sole exception. The body says otherwise: lists, deques, maps, and Some all derive element types from their contents via lub. Iterators and heaps are the variants that report Any.

The # Performance note on Value::static_type, immediately above, already documents the O(n) element scan for List, Map, and Deque — so the two comments contradicted each other. Comment only, no behaviour change.

🤖

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b547ee32cf

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ndc_vm/src/value/mod.rs Outdated
The comment said container element types are reported as `Any` with `Tuple`
as the sole exception. Lists, deques, maps, and `Some` read their element
types from their contents too — as the `Performance` note on
`Value::static_type` directly above already says. Iterators and heaps are
the ones that report `Any`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@timfennis
timfennis force-pushed the housekeeping/static-type-doc-comment branch from b547ee3 to a4b48ce Compare September 2, 2026 18:43
@timfennis
timfennis merged commit a7c424b into master Sep 3, 2026
1 check passed
@timfennis
timfennis deleted the housekeeping/static-type-doc-comment branch September 3, 2026 07:17
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