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

Fix add parameter for records #54427

Merged
merged 1 commit into from
Jun 28, 2021

Conversation

Youssef1313
Copy link
Member

Fixes #54408

Comment on lines +2119 to +2121
case SyntaxKind.RecordDeclaration:
case SyntaxKind.RecordStructDeclaration:
return ((RecordDeclarationSyntax)declaration).WithParameterList((ParameterListSyntax)list);
Copy link
Member Author

Choose a reason for hiding this comment

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

Does someone think it's worth adding a validation in debug mode that uses reflection to make sure new nodes are handled? (This doesn't apply to this method only - there are many that usually get affected)

@jinujoseph jinujoseph added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Jun 28, 2021
@CyrusNajmabadi CyrusNajmabadi merged commit 3383013 into dotnet:main Jun 28, 2021
@ghost ghost added this to the Next milestone Jun 28, 2021
@CyrusNajmabadi
Copy link
Member

Thanks!

@Youssef1313 Youssef1313 deleted the add-param-records branch June 28, 2021 16:52
@RikkiGibson RikkiGibson modified the milestones: Next, 17.0.P2 Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'Add parameter' code fix crashes for the primary constructor of a record
4 participants