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

Signature help does not appear for target typed new with partial parameter #73398

Open
vsfeedback opened this issue May 9, 2024 · 1 comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work]
When a constructor is invoked for a class type that is defined by a function's return type, intellisense does not display the constructor's parameters. In the first screenshot (return new (...), I am attempting to open the intellisense by pressing Ctrl + Shift + Space, but nothing opens. In the second screenshot (return new MyClass(...), I am able to open the intellisense by pressing Ctrl + Shift + Space to see the constructor takes one string.

image.png
image.png


Original Comments

Feedback Bot on 5/6/2024, 01:51 PM:

(private comment, text removed)


Original Solutions

(no solutions)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels May 9, 2024
@dibarbet dibarbet changed the title Constructor intellisense not available for implied C# types Signature help does not appear for target typed new with partial parameter May 9, 2024
@dibarbet
Copy link
Member

dibarbet commented May 9, 2024

Specifically the difference here is that invoking cntrl+shift+space when using the target typed new constructor does not work when the parameter is partially input

Does not work at caret ($$)

public class MyClass(string arg) { }

public MyClass Example1()
{
    string test = "";
    return new(tes$$)
}

Signature help works at caret ($$):

public class MyClass(string arg) { }

public MyClass Example2()
{
    string test = "";
    return new MyClass(tes$$)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants