Skip to content

Conversation

zerbina
Copy link
Collaborator

@zerbina zerbina commented Oct 11, 2025

Summary

Fix the compiler crashing when passing openArray value to
macros.add.

Details

  • handle akOpenArray in vmtypes.elemType (used by the
    mNAddMultiple implementation)
  • handle akString in vmtypes.elemType (fixes nothing, but it
    should still be handled)

@zerbina zerbina added bug Something isn't working compiler/vm Embedded virtual machine lang/macro labels Oct 11, 2025
Copy link
Collaborator

@saem saem left a comment

Choose a reason for hiding this comment

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

It might make sense to handle akString but that's more for uniformity/not tripping up assert unnecessarily -- not a blocker, can merge without.

@zerbina
Copy link
Collaborator Author

zerbina commented Oct 14, 2025

/merge

Copy link

Merge requested by: @zerbina

Contents after the first section break of the PR description has been removed and preserved below:


Notes for Reviewers

  • split out from implement a new CGIR and C code generator #1625
  • elemType is also used for deserializing openArray values, but compile-time evaluation yielding openArray[NimNode] values is such a fringe use case (that also relies on an experimental feature) that I didn't add a test for it

@chore-runner chore-runner bot enabled auto-merge October 14, 2025 00:23
@zerbina zerbina disabled auto-merge October 14, 2025 00:39
@zerbina zerbina added this pull request to the merge queue Oct 14, 2025
Merged via the queue into nim-works:devel with commit 71315c0 Oct 14, 2025
43 checks passed
@zerbina zerbina deleted the vm-fix-nimnode-add branch October 14, 2025 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working compiler/vm Embedded virtual machine lang/macro

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants