Skip to content

Conversation

@wsipak
Copy link
Contributor

@wsipak wsipak commented Dec 30, 2025

This PR adds support for the constexpr match expression.

This is work in progress.
The aim of this PR is to add support for const match expressions, where the arm selection is performed in compilation time.

  • allow parsing const match, as a Match node with a boolean property indicating the const.
  • evaluate the matched value and enforce that it must be possible to evaluate in compilation time for const match
  • select the right arm for a const match in compilation time
  • test DSLX and IR
  • allow disparate types in the arms of a match / do not typecheck the unused arms
  • test generating SystemVerilog
  • test the formatter

Internal-tag: #[88020]
Internal-tag: #[88020]
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