Skip to content

feat: allow enum field array slices as function arguments - #23

Open
vawylon wants to merge 1 commit into
openmultiplayer:masterfrom
vawylon:feature/enum-array-slice
Open

vawylon wants to merge 1 commit into
openmultiplayer:masterfrom
vawylon:feature/enum-array-slice

Conversation

@vawylon

@vawylon vawylon commented Nov 11, 2026 •

Copy link
Copy Markdown

What this PR does / why we need it:

  • Allows enum field array slices to be passed as function array arguments.
  • Propagates the slice size and index tag during argument validation.
  • Validates the actual slice size instead of unconditionally reporting error 047.
  • Adds a runtime regression test for the slice values, sizeof propagation, and return value.

Previously, code such as Sum(data[position]) produced error 047.

Which issue(s) this PR fixes:

N/A

What kind of pull this is:

  • A Bug Fix
  • A New Feature
  • Some repository meta (documentation, etc)
  • Other

Additional Documentation:

None required.

Testing:

ctest --test-dir build -R '^enum_field_array_slice$' --output-on-failure

100% tests passed, 0 tests failed out of 1

The same test fails with error 047 on the unmodified compiler.

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