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

Generate class (in the same file) doesn't work with file-scoped namespaces #54746

Closed
Youssef1313 opened this issue Jul 10, 2021 · 0 comments · Fixed by #55826
Closed

Generate class (in the same file) doesn't work with file-scoped namespaces #54746

Youssef1313 opened this issue Jul 10, 2021 · 0 comments · Fixed by #55826
Assignees
Labels
Area-IDE Concept-Continuous Improvement help wanted The issue is "up for grabs" - add a comment if you are interested in working on it New Language Feature - File Scoped Namespaces
Milestone

Comments

@Youssef1313
Copy link
Member

using System;

namespace ConsoleApp5;
class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("Hello World!");
        C c;
    }
}

There are two issues with the feature:

  1. "Generate class 'C'" does nothing:
    image

  2. "Generate new type..." produces invalid code:
    image
    image

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Jul 10, 2021
@jinujoseph jinujoseph added Community The pull request was submitted by a contributor who is not a Microsoft employee. help wanted The issue is "up for grabs" - add a comment if you are interested in working on it New Language Feature - File Scoped Namespaces and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jul 14, 2021
@jinujoseph jinujoseph added this to the Backlog milestone Jul 14, 2021
@jinujoseph jinujoseph added Concept-Continuous Improvement and removed Community The pull request was submitted by a contributor who is not a Microsoft employee. labels Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Concept-Continuous Improvement help wanted The issue is "up for grabs" - add a comment if you are interested in working on it New Language Feature - File Scoped Namespaces
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants