Skip to content

[Beam] Support Type.GetGenericArguments for reflection#4385

Merged
dbrattli merged 5 commits intomainfrom
dbrattli/beam-generic-arguments
Mar 5, 2026
Merged

[Beam] Support Type.GetGenericArguments for reflection#4385
dbrattli merged 5 commits intomainfrom
dbrattli/beam-generic-arguments

Conversation

@dbrattli
Copy link
Collaborator

@dbrattli dbrattli commented Mar 5, 2026

Summary

  • Add GetGenericArguments as a handled case alongside get_GenericTypeArguments in Beam replacements, routing to the existing get_generics runtime helper
  • Add reflection tests for both GenericTypeArguments (property) and GetGenericArguments (method)

This brings the Beam target in line with JS/Python/Dart/Rust, which all handle both the property and method forms.

Test plan

  • Beam reflection tests pass with the new GetGenericArguments and GenericTypeArguments tests

🤖 Generated with Claude Code

dbrattli and others added 5 commits March 5, 2026 22:31
Add GetGenericArguments as an alias for get_GenericTypeArguments in Beam
replacements, matching how JS/Python/Dart/Rust targets handle it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Port the GetInterface-based test from Python to Beam, exercising
GetGenericArguments on a type obtained via GetInterface.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add tryResolveTypeInfo helper for compile-time resolution of System.Type
methods when the type is known statically via TypeInfo. Implements
GetInterface with case-sensitive and case-insensitive matching, resolving
generic type arguments through interface declarations.

Add corresponding test ported from Python test suite.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dbrattli dbrattli merged commit 532877c into main Mar 5, 2026
23 checks passed
@dbrattli dbrattli deleted the dbrattli/beam-generic-arguments branch March 5, 2026 22:19
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