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

override completion doesn't insert full signature #1725

Closed
333fred opened this issue Feb 27, 2020 · 1 comment · Fixed by #1877
Closed

override completion doesn't insert full signature #1725

333fred opened this issue Feb 27, 2020 · 1 comment · Fixed by #1877

Comments

@333fred
Copy link
Contributor

333fred commented Feb 27, 2020

Issue Description

Override completion does not insert the full signature.

Steps to Reproduce

  1. Create a C# project with a class like this:
class C1
{
	public virtual void M() {}
}
class C2 : C1
{
    // Type here
}
  1. At // Type here, replace the comment with override <space> <ctrl+space>. Valid override method completion should appear.
  2. Select M to override.

Expected Behavior

The full signature of M is inserted, so you end up with public override void M() on the current line.

Actual Behavior

Just M() is inserted, missing the accessibility modifier and the return type.

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.42.1
C# Extension: 1.21.12

Dotnet Information .NET Core SDK (reflecting any global.json): Version: 3.1.200-preview-014977 Commit: ca5522cead

Runtime Environment:
OS Name: Windows
OS Version: 10.0.18363
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.200-preview-014977\

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

.NET Core SDKs installed:
3.0.100-preview8-013437 [C:\Program Files\dotnet\sdk]
3.1.100 [C:\Program Files\dotnet\sdk]
3.1.200-preview-014977 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview8.19374.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.0-preview2.19528.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview8-28373-17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.0-preview2.19525.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-preview8-28373-17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.0-preview2.19525.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

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

Visual Studio Code Extensions
Extension Author Version
auto-close-tag formulahendry 0.5.6
auto-rename-tag formulahendry 0.1.1
azure-account ms-vscode 0.8.8
azure-pipelines ms-azure-devops 1.165.1
code-settings-sync Shan 3.4.3
cpptools ms-vscode 0.26.3
csharp ms-vscode 1.21.12
dotnet-test-explorer formulahendry 0.7.1
EditorConfig EditorConfig 0.14.4
gitignore codezombiech 0.6.0
gitlens eamodio 10.2.1
language-haskell justusadam 2.7.0
ocean-dark-extended kleber-swf 1.5.0
path-intellisense christian-kohler 1.4.2
powershell ms-vscode 2020.1.0
vim vscodevim 1.12.4
vscode-hexdump slevesque 1.7.2
vscode-icons vscode-icons-team 10.0.0
vscode-il soltys 0.0.1
vsonline ms-vsonline 1.0.1672
xml DotJoshJohnson 2.5.0
@filipw
Copy link
Member

filipw commented Mar 3, 2020

This is not really a "bug" more like a "known limitation".

We will have better support for this when we move to the Roslyn completion service, I have a WIP branch for this in Omnisharp-roslyn.

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