Skip to content

Simplify Enums & Static Final Fields#222

Merged
rcosta358 merged 1 commit into
mainfrom
simplify-enums
May 13, 2026
Merged

Simplify Enums & Static Final Fields#222
rcosta358 merged 1 commit into
mainfrom
simplify-enums

Conversation

@rcosta358
Copy link
Copy Markdown
Collaborator

Description

This PR updates the expression simplification so enums and static final fields are treated as constants during variable propagation and expression folding.

Example

  • current == mode && mode == Mode.Photocurrent == Mode.Photo
  • mode == Mode.Photo && (mode == Mode.Video ? explicit(param) : start(param))start(param)

Related Issue

None.

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Code refactoring

Checklist

  • Added/updated tests in ExpressionSimplifierTest
  • mvn test passes locally
  • Updated docs/README if behavior or API changed

@rcosta358 rcosta358 requested a review from CatarinaGamboa May 13, 2026 14:31
@rcosta358 rcosta358 self-assigned this May 13, 2026
@rcosta358 rcosta358 added enhancement New feature or request simplification Related to the simplification of expressions labels May 13, 2026
Copy link
Copy Markdown
Collaborator

@CatarinaGamboa CatarinaGamboa left a comment

Choose a reason for hiding this comment

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

lgtm 🥳

@rcosta358 rcosta358 merged commit 6d1f086 into main May 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request simplification Related to the simplification of expressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants