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

No IntelliSense & parameter hints for calls to local functions #1715

Closed
cateyes99 opened this issue Aug 16, 2017 · 5 comments
Closed

No IntelliSense & parameter hints for calls to local functions #1715

cateyes99 opened this issue Aug 16, 2017 · 5 comments

Comments

@cateyes99
Copy link

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.1)

Product Information:
 Version:            1.0.1
 Commit SHA-1 hash:  005db40cd1

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.11
 OS Platform: Darwin
 RID:         osx.10.11-x64
 Base Path:   /usr/local/share/dotnet/sdk/1.0.1

VS Code version: 1.14.2
C# Extension version: 1.11.0

Steps to reproduce

Create a local function, and make a call to it:

static void main(string[] args)
{
    var flag = LocalFunction(1);
    bool LocalFunction(int i)
    {
        return i > 0;
    }
}

Expected behavior

  1. When typing arguments for the call to the local function, in var flag = LocalFunction(1);, IntelliSense should be provided for the parameter hints.

  2. When using the feature Trigger Parameter Hints Space it should trigger the parameter hints for the call to the local function.

Actual behavior

No IntelliSense provided for 1, and no parameter hints triggered for 2.

@rchande
Copy link

rchande commented Nov 15, 2017

This is another good one for @akshita31 to look at (cc @DustinCampbell @TheRealPiotrP )

@DustinCampbell
Copy link
Member

Agreed. @akshita31, I went ahead and assigned this to you.

@DustinCampbell DustinCampbell added this to the 1.14 milestone Nov 15, 2017
@akshita31
Copy link
Contributor

The problem here is that in the SignatureHelpService, we are first finding the containingType for the given invocation and then returning all the methods in that containingType with the same name as the method. In case of localFunction , the containing type is being returned as the Class name and not the main function .But I am not sure whether this is the problem with roslyn returning the incorrect containingType or a problem with the way we are finding the methodOverloads in omnisharp-roslyn.

@DustinCampbell
Copy link
Member

The fix for this issue has been merged into OmniSharp. Once we take a new build of OmniSharp, it will appear here.

@akshita31
Copy link
Contributor

akshita31 commented Feb 7, 2018

This issue has been fixed in the 1.14 milestone. We just released a beta of 1.14 - https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.14.0-beta4. Follow these instructions to install a beta release of C# for VS Code.

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

No branches or pull requests

4 participants