dotnet / dotnet/vscode-csharp

Intellisense does not correctly scope enum values in method parameters

Open
#4,001 4 comments 0 reactions 0 assignees View on GitHub
Editor-IntelliSense OmniSharp Triaged
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
18h 40m
Merged PRs (30d)
31

Description

## Issue Description ##

If I use intellisense to fill in an enum method parameter it does not add the class before the enum.

## Steps to Reproduce ##

Invoke intellisense to auto fill the enum parameter

## Expected Behavior ##

SomeMethod(SomeClass.SomeEnum.SomeValue);// Ok

## Actual Behavior ##

SomeMethod(SomeEnum.SomeValue);// Compile error

## Logs ##

### OmniSharp log ###
Post the output from Output-->OmniSharp log here

### C# log ###
Post the output from Output-->C# here

## Environment information ##

**VSCode version**: 1.48.0
**C# Extension**: 1.23.0

Mono Information
OmniSharp using global mono :6.6.0
Dotnet Information
.NET Core SDK (reflecting any global.json):
Version: 3.1.101
Commit: b377529961

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

Host (useful for support):
Version: 3.1.1
Commit: a1388f194c

.NET Core SDKs installed:
2.1.302 [/usr/local/share/dotnet/sdk]
2.2.104 [/usr/local/share/dotnet/sdk]
3.1.101 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions

|Extension|Author|Version|
|---|---|---|
|azure-account|ms-vscode|0.9.2|
|binary-plist|dnicolson|0.4.0|
|csharp|ms-dotnettools|1.23.0|
|playfab-explorer|Playfab|0.1.11|
|quicktype|quicktype|12.0.46|
|syntax-project-pbxproj|mariomatheu|0.1.3|
|unity-debug|Unity|2.7.5|
|vscode-azurefunctions|ms-azuretools|0.23.0|;

om your clipboard

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.