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

IntelliSense - Display names of properties assignable by an object initializer in auto-completion list without needing editor.wordBasedSuggestions. #656

Closed
seraku24 opened this issue Aug 12, 2016 · 1 comment

Comments

@seraku24
Copy link
Contributor

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
 Version:            1.0.0-preview2-003121
 Commit SHA-1 hash:  1e9d529bc5

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64

VS Code version: 1.4.0
C# Extension version: 1.3.0

Steps to reproduce

  1. Disable editor.wordBasedSuggestions.
  2. Type the open curly brace that begins an object initializer. (See the following code snippet.)
class Person {
    public string FirstName;
    public string LastName;
}

static class Program {
    private static void Main() {
        var chemist = new Person { FirstName = "Walter", LastName = "White", };
    }
}

This issue occurs after typing new Person {.

Expected behavior

The names of any assignable properties are shown in the auto-completion list.

Actual behavior

No property names are included in the auto-completion list.

Like issue #652, the editor option editor.wordBasedSuggestions might show the property names only as a side effect. The expectation is that IntelliSense recognizes an object initializer and displays the writable properties of the object, which matches the behavior seen in Visual Studio.

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

3 participants