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

Offer enum completion inside an enum member's initializer #19338

Merged

Conversation

CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented May 8, 2017

Fixes #5419

@CyrusNajmabadi
Copy link
Member Author

Tagging @dotnet/roslyn-ide

@CyrusNajmabadi
Copy link
Member Author

retest windows_debug_unit32_prtest please

@CyrusNajmabadi
Copy link
Member Author

tagging @MattGertz

Customer scenario

Customer is typign inside an enum, but does not get enum autocomplete in an enum initializer.

Bugs this fixes:

#5419

Workarounds, if any

None

Risk

Low

Performance impact

Low

Is this a regression from a previous update?

No.

Root cause analysis:

Compiler behaves differently inside an enum, leading our enum completion code to not behave as expected.

How was the bug found?

Customer reported.

@"using System;

[Flags]
internal enum ProjectTreeWriterOptions
Copy link
Member

Choose a reason for hiding this comment

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

❕ Need tests for each of the allowed underlying enum types (prime candidate for a [Theory])

❕ Need a test for an enum without [Flags] so future changes in behavior won't go undetected.

@CyrusNajmabadi CyrusNajmabadi merged commit 022d70e into dotnet:master May 8, 2017
@CyrusNajmabadi CyrusNajmabadi deleted the completionInEnumInitializer branch May 8, 2017 18:12
@jasonmalinowski
Copy link
Member

@CyrusNajmabadi Was this already working in VB? (I can imagine it was given how magically different that is.)

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

Successfully merging this pull request may close these issues.

6 participants