Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Nested private custom formatters result in CS0122: inaccessible from source generated resolver #1817

Copy link
Copy link
Closed
@AArnott

Description

@AArnott
Issue body actions

Given code like this:

class A {
   private class JTokenFormatter : IMessagePackFormatter<JToken?> { /* ... */ }
}

The source generated resolver will try to access that formatter, and cannot due to visibility rules. The compilation breaks with a CS0122 error.

We should skip private formatters, and possibly report a warning diagnostic.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.