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

Check declaring types when performing accessibility checks for code gen. #1284

Merged
merged 1 commit into from
Jan 16, 2016

Conversation

ReubenBond
Copy link
Member

Fixes #1283.

I haven't run tests on this, it's just a quick fix, so we'll see what CI says.

The change is this: IsTypeIsInaccessibleForSerialization now has only one path which can return false (signifying that a type is accessible for serialization). Each check can trigger short-circuiting & return true if a type is inaccessible, but otherwise execution will fall through to the next check.

Hopefully the code is easier to reason about now that there is only one happy path.

We also check the accessibility of the declaring type to fix #1283.

@gabikliot gabikliot added the bug label Jan 14, 2016
@sergeybykov sergeybykov self-assigned this Jan 14, 2016
sergeybykov added a commit that referenced this pull request Jan 16, 2016
Check declaring types when performing accessibility checks for code gen.
@sergeybykov sergeybykov merged commit 8cf4d8e into dotnet:master Jan 16, 2016
@ReubenBond ReubenBond deleted the fix-type-accessibility-check branch January 16, 2016 10:06
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CodeGen Serializer is generated for private nested class with enum
4 participants