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

File and required modifiers are missing from CSharpAccessibilityFacts.GetAccessibilityAndModifiers #62371

Closed
RikkiGibson opened this issue Jul 5, 2022 · 2 comments · Fixed by #62945
Assignees
Milestone

Comments

@RikkiGibson
Copy link
Contributor

RikkiGibson commented Jul 5, 2022

I expect the lack of file being handled here to cause problems with a public API path:

modifiers |= token.Kind() switch
{
SyntaxKind.AbstractKeyword => DeclarationModifiers.Abstract,
SyntaxKind.NewKeyword => DeclarationModifiers.New,
SyntaxKind.OverrideKeyword => DeclarationModifiers.Override,
SyntaxKind.VirtualKeyword => DeclarationModifiers.Virtual,
SyntaxKind.StaticKeyword => DeclarationModifiers.Static,
SyntaxKind.AsyncKeyword => DeclarationModifiers.Async,
SyntaxKind.ConstKeyword => DeclarationModifiers.Const,
SyntaxKind.ReadOnlyKeyword => DeclarationModifiers.ReadOnly,
SyntaxKind.SealedKeyword => DeclarationModifiers.Sealed,
SyntaxKind.UnsafeKeyword => DeclarationModifiers.Unsafe,
SyntaxKind.PartialKeyword => DeclarationModifiers.Partial,
SyntaxKind.RefKeyword => DeclarationModifiers.Ref,
SyntaxKind.VolatileKeyword => DeclarationModifiers.Volatile,
SyntaxKind.ExternKeyword => DeclarationModifiers.Extern,
_ => DeclarationModifiers.None,
};

Originally posted by @Youssef1313 in #62215 (review)

Would like to determine what features are impacted here and make sure we fix this up along with appropriate tests during the preview.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Jul 5, 2022
@Youssef1313
Copy link
Member

Youssef1313 commented Jul 6, 2022

It looks like required is also missing from the list.

Edit: I see the title already mentions it, didn't notice initially 😄

@jcouv jcouv removed the untriaged Issues and PRs which have not yet been triaged by a lead label Jul 7, 2022
@jcouv jcouv added this to the 17.4 milestone Jul 7, 2022
@jcouv jcouv added the Bug label Jul 7, 2022
@Youssef1313
Copy link
Member

The remaining work here is for 'required'.

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

Successfully merging a pull request may close this issue.

4 participants