Skip to content

A StructVariant DynamicEnum always returns None from the field_at method #20402

Closed

Description

@jhgarner

Bevy version

0.16

What you did

I tried to use the field_at method on a StructVariant DynamicEnum.

What went wrong

The docs for field order say that field_at should be implemented for struct variant enums. Since DynamicEnum is builtin, I expect it to follow that convention, but the DynamicEnum implementation doesn't follow it. Is it possible for DynamicEnum to follow this convention? If it isn't, could this be called out in the docs?

Activity

  1. added
    C-BugAn unexpected or incorrect behavior
    S-Needs-TriageThis issue needs to be labelled
    on Aug 3, 2025
  2. added
    A-ReflectionRuntime information about types
    S-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!
    and removed
    S-Needs-TriageThis issue needs to be labelled
    on Aug 4, 2025
  3. alice-i-cecile commented on Aug 4, 2025

    @alice-i-cecile
    Member

    Just looks like an oversight. We'd appreciate a PR to fix this!

  4. added a commit that references this issue on Aug 5, 2025
    dd7ca08
  5. added a commit that references this issue on Aug 9, 2025
    684c7ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ReflectionRuntime information about typesC-BugAn unexpected or incorrect behaviorD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions