Skip to content

Fix add parameter for records#54427

Merged
CyrusNajmabadi merged 1 commit intodotnet:mainfrom
Youssef1313:add-param-records
Jun 28, 2021
Merged

Fix add parameter for records#54427
CyrusNajmabadi merged 1 commit intodotnet:mainfrom
Youssef1313:add-param-records

Conversation

@Youssef1313
Copy link
Copy Markdown
Member

Fixes #54408

Comment on lines +2119 to +2121
case SyntaxKind.RecordDeclaration:
case SyntaxKind.RecordStructDeclaration:
return ((RecordDeclarationSyntax)declaration).WithParameterList((ParameterListSyntax)list);
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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