Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix providing annotations vs inherited annotations #529

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

kciesielski
Copy link
Member

PR #525 introduced changes to CollectAnnotations.fromDeclarations, causing incorrect creation of annotation list for class fields which override base trait fields: inheritedAnns returns an empty list, while anns returns a list containing both field annotations and inherited annotations.
This problem slipped through tests, as we use a Show derivation which prints strings without differentiating field/inherited annotations. The issue has been detected in Tapir schema derivation tests.

This PR adjusts tests to include this distinction and fixes annotation extraction methods.

@kciesielski kciesielski marked this pull request as ready for review April 25, 2024 11:30
@kciesielski kciesielski requested a review from adamw April 25, 2024 11:30
@kciesielski kciesielski merged commit 267acc4 into scala3 Apr 25, 2024
7 checks passed
@kciesielski kciesielski deleted the fix/inherited-annotations branch April 25, 2024 11:40
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