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

Query: Skip updating NewExpression without ctor #18391

Merged
merged 1 commit into from
Oct 17, 2019

Conversation

smitpatel
Copy link
Contributor

Scenario: NewExpression of struct type which does not have any ctor arguments (so new DateTime()). New DateTime(2019, 12, 11) still has ctor so it works fine. Struct type could be user defined or system defined.
Root cause: When calling NewExpression.Update the way checking if arguments are changed is different in .NET Framework & Core. Since arguments are 0, it should not need to be updated. .NET Core identifies this correctly and does not cause regeneration avoiding the exception.

@smitpatel smitpatel changed the base branch from feature/net472 to release/3.1 October 16, 2019 01:20
Copy link
Member

@AndriySvyryd AndriySvyryd left a comment

Choose a reason for hiding this comment

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

Make sure this doesn't get into master

@smitpatel smitpatel force-pushed the smit/dotnetmagic branch 2 times, most recently from 00e1af8 to d308c45 Compare October 16, 2019 20:01
Scenario: NewExpression of struct type which does not have any ctor arguments (so new DateTime()). New DateTime(2019, 12, 11) still has ctor so it works fine. Struct type could be user defined or system defined.
Root cause: When calling NewExpression.Update the way checking if arguments are changed is different in .NET Framework & Core. Since arguments are 0, it should not need to be updated. .NET Core identifies this correctly and does not cause regeneration avoiding the exception.
@smitpatel smitpatel merged commit 2a39b06 into release/3.1 Oct 17, 2019
@smitpatel smitpatel deleted the smit/dotnetmagic branch October 17, 2019 18:30
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