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]
@magancarz magancarz force-pushed the 88020-const-match branch 2 times, most recently from 58c0b2d to 6ba1ec9 Compare January 13, 2026 14:55
@magancarz
Copy link

I've added formatting const match and rebased changes on main.

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.

2 participants