Skip to content

Refactor PropertyResolverGenerator to remove commented code and simplify logic; update tests for generated methods#4

Merged
tombiddulph merged 1 commit intomainfrom
fix-impl
Feb 6, 2026
Merged

Refactor PropertyResolverGenerator to remove commented code and simplify logic; update tests for generated methods#4
tombiddulph merged 1 commit intomainfrom
fix-impl

Conversation

@tombiddulph
Copy link
Owner

This pull request updates the property resolver source generator to always generate a resolver method, even when no matching properties are found. The generated methods now explicitly return null when no matches exist, and the corresponding tests have been updated to reflect this new behavior.

Generator behavior changes:

  • The generator now always emits a resolver method for each configured property, even if no matching properties are found. The method returns null for unmatched cases.
  • Removed commented-out code that previously registered the attribute source, cleaning up the initialization logic.

Test updates:

  • Updated tests to expect the presence of the generated resolver method and a default arm returning null when no matches are found, instead of the absence of the method. [1] [2]
  • Added assertions to ensure that no type-specific match arms are generated when all types are generic.

…ify logic; update tests for generated methods
@tombiddulph tombiddulph merged commit ac72e5d into main Feb 6, 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.

1 participant