Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

Fixes #75992

@CyrusNajmabadi CyrusNajmabadi requested review from a team as code owners November 30, 2024 21:23
@ghost ghost added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 30, 2024
@CyrusNajmabadi
Copy link
Member Author

@dotnet/roslyn-compiler @RikkiGibson ptal.

@jaredpar jaredpar added Feature - File-Local Types File-local types (file types) and removed untriaged Issues and PRs which have not yet been triaged by a lead VSCode labels Dec 2, 2024
@CyrusNajmabadi
Copy link
Member Author

@dotnet/roslyn-compiler @RikkiGibson ptal. Thanks!

while (true)
{
if (this.CurrentToken.Kind == SyntaxKind.OpenBraceToken ||
((_termState & TerminatorState.IsEndOfRecordOrClassOrStructOrInterfaceSignature) != 0 && this.CurrentToken.Kind == SyntaxKind.SemicolonToken) ||
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_termState check was unnecessary. Assert and comment added at start of method to explain why.

{
UsingTree("""
class C : B
file class D
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine a similar, more contrived case may also be positively impacted

class Outer
{
    class C : B

    required int Prop { get; set; }
}

but, don't find it interesting enough to ask you to come back and add the test.

@CyrusNajmabadi
Copy link
Member Author

@dotnet/roslyn-compiler for a second pair of eyes on this simple pr :) Thanks!

@CyrusNajmabadi CyrusNajmabadi merged commit 517ce1a into dotnet:main Dec 5, 2024
28 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the fileModifierParsing branch December 5, 2024 20:17
@CyrusNajmabadi
Copy link
Member Author

Thanks!

@dibarbet dibarbet added this to the 17.13 P3 milestone Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Implement abstract class generates invalid code when target type has no body and is followed by file-scoped type

5 participants