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

Issue #854: Fix conversion error when Handle clause property differs by case from actual property #855

Merged
merged 1 commit into from
Mar 26, 2022

Conversation

jrmoreno1
Copy link
Contributor

@jrmoreno1 jrmoreno1 commented Mar 26, 2022

Link to issue(s) this covers
#854

Problem

When the property declaration and the property reference in the Handles clause, differ by case, the conversion fails trying to create two event containers.

Solution

  • Pass the semantic model to CreateEventContainer so it can be used to get the name from the property declaration
  • Change is relatively minor, all unit test continue to pass
  • Added new unit test, unit test fails without change, passes after change.
  • Copied "hasLineCommentConversionIssue: true /Fields re-ordered/);" from another test, not sure what that actually means.

…ase for property with event, use semantic model to get official name of the property
@GrahamTheCoder GrahamTheCoder merged commit 7247032 into icsharpcode:master Mar 26, 2022
@GrahamTheCoder
Copy link
Member

GrahamTheCoder commented Mar 26, 2022

Looks good, thanks for that!

I've removed hasLineCommentConversionIssue: true /Fields re-ordered/);. In fact I've removed it from all but one of the few other places it was used in favour of being more specific about which comments move about. I've added a bit more explanation in a doc comment and made the test fail when it's incorrectly used:

By default tests run a second time with a numbered comment added to each line (that doesn't already have a comment) and checks the comments come out in the same order. If the order significantly changes, or there are input lines where a line comment is invalid (e.g. multiline xml literal) you can use incompatibleWithAutomatedCommentTesting to skip the check

@jrmoreno1 jrmoreno1 deleted the Issue854 branch March 26, 2022 13:22
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