Skip to content
New issue

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

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

Already on GitHub? # to your account

Completion does not filter list for new object based on generic argument type constraints #45109

Closed
kzu opened this issue Jun 12, 2020 · 3 comments · Fixed by #76786
Closed

Comments

@kzu
Copy link
Contributor

kzu commented Jun 12, 2020

Version Used: Version 16.7.0 Preview 3.0 [30208.133.master]

Similar to #45106, but for the completion after new , which also does not filter the list (or even automatically
offer it) according to the parameter expected type (and its constraints).

NoNewCompletionFilter

Even if the type is a concrete type and not generic, the list isn't filtered to types that inherit from the given
parameter type:

NoNewExceptionFilter

@jinujoseph jinujoseph added this to the Backlog milestone Jun 20, 2020
@jinujoseph
Copy link
Contributor

cc @genlu

@genlu
Copy link
Member

genlu commented Jan 13, 2025

Need to try target type filter to see if it can be used here

ToddGrun added a commit to ToddGrun/roslyn that referenced this issue Jan 16, 2025
This allows "new |" completion to populate the target type filter with types that derive from the specified target type.

Fixes dotnet#45109
@kzu
Copy link
Contributor Author

kzu commented Jan 20, 2025

So excited that this improvement will ship!! Thanks for fixing the little things too 🙏 .

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants