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

Make enum cases public #5002

Merged
merged 4 commits into from
May 29, 2018
Merged

Conversation

KevinRansom
Copy link
Member

  • Current F# Code generation for internal Enums makes the cases internal. This PR aligns our code gen with C# by generating Enum Cases that are public, under all conditions.

image

@KevinRansom KevinRansom requested a review from dsyme May 25, 2018 06:42
@KevinRansom KevinRansom changed the title Makeenumcasespublic Make enum cases public May 25, 2018
IsHiddenRecdField eenv.sigToImplRemapInfo (tcref.MakeNestedRecdFieldRef fspec))
let isPropHidden =
// Enums always have public cases irrespective of Enum Visibility
if tycon.IsEnumTycon then false
Copy link
Contributor

@dsyme dsyme May 25, 2018

Choose a reason for hiding this comment

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

The value__ field in enums should always be private, I think this will have changed?.

Also we need to have a CodeGen test for enums...

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I expect it will. I can fix those.

Copy link
Member Author

Choose a reason for hiding this comment

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

@dsyme

The C# compiler emits a public value__ field

image

I think we should match C# right?

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

Successfully merging this pull request may close these issues.

2 participants