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: extract constructor parameters & generic type info form derived attributes #340

Merged

Conversation

jupjohn
Copy link
Contributor

@jupjohn jupjohn commented Jan 21, 2023

This PR aims to fix an issue introduced in #321 (reported by @glen-84 in comments) where derived attributes failed to extract parameters/generic types. This was caused by the configuration builder getting generic type arguments from the attribute class without also looking at the base class - as well as my own lack of understand on how Vogen extracted data from attributes (e.g. conversions).

As part of this fix I've also modified the test that produced a false positive to cover both non-int types and custom parameters. The README has also been updated to highlight that constructors of derived attributes need to have the defaults in their constructor, not the base constructor.

README.md Outdated Show resolved Hide resolved
Copy link
Owner

@SteveDunn SteveDunn left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for your contribution!

README.md Show resolved Hide resolved
@SteveDunn SteveDunn merged commit 4c3fb93 into SteveDunn:main Jan 22, 2023
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.

None yet

2 participants