Skip to content

fix #269 - #270

Merged
joergbrech merged 6 commits into
mainfrom
269-store-a-type-hint-in-grunkdynamicfeature
Jul 30, 2026
Merged

joergbrech merged 6 commits into
mainfrom
269-store-a-type-hint-in-grunkdynamicfeature

Conversation

@joergbrech

Copy link
Copy Markdown
Collaborator

No description provided.

@joergbrech joergbrech linked an issue Jul 30, 2026 that may be closed by this pull request
@joergbrech
joergbrech marked this pull request as ready for review July 30, 2026 07:37
joergbrech and others added 4 commits July 30, 2026 09:40
…-in-grunkdynamicfeature

# Conflicts:
#	grunk/dynamic/DynamicFeature.hpp
…fy_type registry gap

Address post-review follow-ups from PR #270 (grunk::DynamicFeature type
hints / native colon-call dispatch):

- Expose DynamicFeature::call to Python via nb::args, so the Python doc
  example actually works. call()'s variadic template now special-cases a
  single std::vector<object> argument (expanded via sol::as_args) instead
  of adding a second overload, which turned out to be ambiguous with the
  template and silently forwarded the whole vector as one opaque Lua
  argument - mirrors the same convention already used by grunk::action().
- Split the Feature usertype's __index fallback into three distinct error
  messages (no type hint / hint with no registered usertype / known type
  missing the requested member) backed by a new state::m_type_names map,
  instead of one message that conflated all three failure modes.
- Make modify_type<T> populate m_type_registry/m_type_names itself rather
  than relying on a prior register_type call for the same table to have
  already done so.
- Document that overloaded member functions (sol::overload(...)) don't
  get a return-type hint, same root cause as constructors before
  add_constructors started stamping theirs manually.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UZKAeFJHMA8uVJ9oDco5p5
@joergbrech
joergbrech merged commit 2e30bdb into main Jul 30, 2026
14 checks passed
joergbrech added a commit that referenced this pull request Jul 30, 2026
Fix regression of #270: colon operator doesn't work if type-hint is behind a custom pointer
joergbrech added a commit that referenced this pull request Jul 30, 2026
joergbrech added a commit that referenced this pull request Sep 17, 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.

Store a type hint in grunk::DynamicFeature

1 participant