Skip to content

Refactor Refinement Predicate#205

Merged
rcosta358 merged 3 commits intomainfrom
refactor-refinement-predicate
Apr 11, 2026
Merged

Refactor Refinement Predicate#205
rcosta358 merged 3 commits intomainfrom
refactor-refinement-predicate

Conversation

@rcosta358
Copy link
Copy Markdown
Collaborator

This PR refactors the usage and semantics of the @RefinementPredicate annotation.
It has two main changes:

  • Removes the ghost and type keywords from the grammar, as they were redundant and provided no practical benefit
  • Changes the annotation target from methods/constructors to classes/interfaces, since it adds the ghost globally and not on a method-level scope

These changes simplify the annotation model and make its usage more intuitive and consistent.

@rcosta358 rcosta358 self-assigned this Apr 7, 2026
@rcosta358 rcosta358 requested a review from CatarinaGamboa April 7, 2026 13:56
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

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
@Target({ElementType.TYPE})
public @interface RefinementPredicateMultiple {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

you can use the same trick as you used for the other ones

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, this branch didn't have the changes from #199.

@rcosta358 rcosta358 merged commit 4090430 into main Apr 11, 2026
1 check passed
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