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

ReflectionTools methods unexpectedly return static constructors #184

Closed
wjrogers opened this issue Oct 4, 2019 · 0 comments · Fixed by #185
Closed

ReflectionTools methods unexpectedly return static constructors #184

wjrogers opened this issue Oct 4, 2019 · 0 comments · Fixed by #185
Labels
bug Something isn't working
Milestone

Comments

@wjrogers
Copy link
Contributor

wjrogers commented Oct 4, 2019

The methods GetConstructorOrNull, GetSingleConstructorOrNull, and SingleConstructor return static constructors, causing e.g. an unexpected exception calling SingleConstructor on a type with a single instance constructor.

I will post a PR with tests and a suggested fix shortly.

wjrogers added a commit to wjrogers/DryIoc that referenced this issue Oct 4, 2019
wjrogers added a commit to wjrogers/DryIoc that referenced this issue Oct 4, 2019
Don't consider static constructors when searching for specific or single
constructors of a type.

fixes dadhi#184
@dadhi dadhi closed this as completed in #185 Oct 4, 2019
dadhi pushed a commit that referenced this issue Oct 4, 2019
…ods (#185)

* Add tests for ReflectionTools constructor methods

see #184

* Use Constructors(includeStatic: false) in GetConstructor() methods

Don't consider static constructors when searching for specific or single
constructors of a type.

fixes #184
Leszek-Kowalski pushed a commit to Leszek-Kowalski/DryIoc that referenced this issue Oct 11, 2019
…ods (dadhi#185)

* Add tests for ReflectionTools constructor methods

see dadhi#184

* Use Constructors(includeStatic: false) in GetConstructor() methods

Don't consider static constructors when searching for specific or single
constructors of a type.

fixes dadhi#184
@dadhi dadhi added the bug Something isn't working label Dec 28, 2019
@dadhi dadhi added this to the v4.1.0 milestone Dec 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants