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

[Bug]: Suggestion IDE0300 does not appear for arguments in primary constructor's base class constructor #72337

Closed
just-ero opened this issue Feb 29, 2024 · 2 comments · Fixed by #72421
Labels
Area-IDE Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it
Milestone

Comments

@just-ero
Copy link

Version Used

  • Compiler version: 4.10.0-2.24102.11 (b14dc4d)
  • VSCode: 1.87.0, 019f4d1419fbc8219a181fab7892ebccf7ee29a2, x64
  • C# extension: v2.18.16, C# Dev Kit Extension: v1.3.10

Steps to Reproduce

  1. Open or create any C# project in Visual Studio Code.
  2. class Class1(int[] arr);
    
    class Class2() : Class1(new int[] { 1, 2, 3 });
    (Side note: this also suffers from [Bug]: Extract to static readonly field code fix does not generate required field #72334, regardless of whether Class2 has a body or not.)

Expected Behavior

Suggestion IDE0300 appears on the new int[] { 1, 2, 3 } argument.

Actual Behavior

Suggestion IDE0300 does not appear. For comparison, the suggestion does appear if a normal constructor is used.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 29, 2024
@CyrusNajmabadi CyrusNajmabadi added Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 29, 2024
@CyrusNajmabadi CyrusNajmabadi added this to the Backlog milestone Feb 29, 2024
@ghost
Copy link

ghost commented Mar 5, 2024

Hey, can I take this?

@CyrusNajmabadi
Copy link
Member

Definitely :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

2 participants